iOS项目开发经验:【常用代码7】

<7-1> iOS 5.0 UIAlertView 可以使用 alertViewStyle 属性实现登陆等效果

typedef enum {
   UIAlertViewStyleDefault = 0,
   UIAlertViewStyleSecureTextInput,
   UIAlertViewStylePlainTextInput,
   UIAlertViewStyleLoginAndPasswordInput
} UIAlertViewStyle;

alertView.alertViewStyle = UIAlertViewStyleLoginAndPasswordInput;


<7-2> 代码方式实现UIAlertView的dismiss

[alertView dismissWithClickedButtonIndex:0 animated:NO];

 

<7-3> plist的读取

 //get the plist file from bundle  
 NSString *plistPath = [[NSBundle mainBundle] pathForResource:@"info" ofType:@"plist"];   
 // build the array from the plist  
 NSMutableArray *anArray = [[NSMutableArray alloc]initWithContentOfFile:plistPath];


 





你可能感兴趣的:(★iOS篇)