摘要:
1.UITextField的初始化和设置 textField = [[UITextField alloc] initWithFrame:CGRectMake(120.0f, 80.0f, 150.0f, 30.0f)]; [textField setBorderStyle:UITextBorderStyleRoundedRect]; //外框类型 textField.placeholder = @"password"; //默认显示的字 textField.secureTextEntry = YES; //密码 textField.autocorrectionType .. 阅读全文
摘要:
NSDictionary和NSArray一样,都不能直接存储基本类型,比如:int、float、char等,而只能存储对象!那该怎么处理呢?很简单,先把基本类型转化成NSNumber对象,存进去;要取的时候,再从NSNumber里面取出来。具体实现如下:float fNum = 10;NSNumber *tempFNum = [NSNumber numberWithFloat:fNum]; NSDictionary *dict = [NSDictionary dictionaryWithObjectsAndKeys:tempFNum, @"FNum",nil];fNum = 阅读全文
摘要:
1 实现如下: 2 首先加入委托:UIPopoverControllerDelegate 3 先创建一个popover和实例化tableview的类(该类的xib文件中,view中就放了一个tablview): 4 UIPopoverController *popover; 5 popTableViewController *popoverContent; 6 7 在CustomerDetailVC.m放入: 8 #import "CustomerDetailVC.h" 9 #import "popTableViewController.h" 10 @i 阅读全文