
ios
killthosemadafaka
这个作者很懒,什么都没留下…
展开
-
动态设置 UITextField
//设置位置大小 text3 = [[UITextField alloc] initWithFrame:CGRectMake(120,200, 150, 30)]; //设置外观 text3.borderStyle = UITextBorderStyleRoundedRect; //设置字体大小 text3.font = [UIFont systemFont原创 2013-10-02 01:30:02 · 621 阅读 · 0 评论 -
iOS TableView 使用(swift)
iOS tableview swiftclass ViewController:UIViewController ,UITableViewDelegate,UITableViewDataSource2.要将原创 2015-01-07 01:26:31 · 554 阅读 · 0 评论 -
IOS UITableview
1. .h 文件要声明协议UITableViewDataSource>2.再.h文件中创建数据集合@property (nonatomic,retain)NSArray *listArray;//tableView的数据集合3..h中声明变量@private UITableView *_tableView;4.实例化变原创 2013-10-23 14:52:58 · 704 阅读 · 0 评论 -
IOS UISlider
UISlider *slider = [[UISlideralloc] initWithFrame:CGRectMake(60,200, 200, 0)]; slider.tag =152; slider.maximumValue =10; slider.minimumValue =0; //设置slider监听事原创 2013-10-22 23:26:58 · 840 阅读 · 0 评论 -
IOS UIImageView
UIImageView *imageView = [[UIImageViewalloc] initWithFrame:CGRectMake(140,330, 50, 50)]; imageView.userInteractionEnabled =YES; //imageView.highlighted = YES;//flag设置标志以显示高亮图片原创 2013-10-23 00:29:33 · 590 阅读 · 0 评论 -
IOS UIActionSheet
UIActionSheet *sheet = [[UIActionSheetalloc] initWithTitle:@"title"delegate:selfcancelButtonTitle:@"cancel"destructiveButtonTitle:@"destructive"otherButtonTitles:@"other",nil];[sheet s原创 2013-10-23 00:07:10 · 656 阅读 · 0 评论 -
IOS UIAlertView
UIAlertView *alertView = [[UIAlertViewalloc] initWithTitle:@"title"message:@""delegate:selfcancelButtonTitle:@"cancel"otherButtonTitles:@"other",nil];[alertView show];用到代理方法时原创 2013-10-22 23:50:33 · 660 阅读 · 0 评论 -
IOS UITextField
_helloField = [[UITextFieldalloc] initWithFrame:CGRectMake(70,150, 140, 40)]; //样式,如果要用自定义图片背景的话要设成none _helloField.borderStyle =UITextBorderStyleLine; _helloField.placeho原创 2013-10-20 19:33:42 · 891 阅读 · 0 评论 -
IOS UIButton
//工厂方法创建button并设定样式 UIButton *button = [UIButtonbuttonWithType:UIButtonTypeRoundedRect]; //设置成禁用 //button.enabled = NO; //设置选中 //button.selected = YES;原创 2013-10-20 18:38:57 · 768 阅读 · 0 评论 -
IOS 通知
1.注册通知//通知 向通知中心注册了一条名为ChangeTextNotification的通知。 [[NSNotificationCenterdefaultCenter] addObserver:selfselector:@selector(changeTextContent:)name:@"ChangeTextNotification"objec原创 2013-10-17 23:07:30 · 524 阅读 · 0 评论 -
IOS UILabel
UILabel *label = [[UILabelalloc] initWithFrame:CGRectMake(90,30, 140, 40)]; label.text =@"hello label abcdefghijklmn"; label.font = [UIFontsystemFontOfSize:10]; //换行 l原创 2013-10-18 00:04:21 · 596 阅读 · 0 评论 -
IOS 设置代理
1.先在需要使用代理的类.h文件中声明协议并创建代理实例//定义协议@protocol ModalViewControllerDelegate NSObject>@optional- (void)changeTextContent:(NSString *)text;@end//创建代理实例@property (no原创 2013-10-16 22:57:38 · 936 阅读 · 0 评论 -
IOS 模态视图跳转界面
跳转- (IBAction)present:(id)sender { NSLog(@"the button,is clicked ..."); //创建准备跳转的UIViewController ModalViewController *modalViewController = [[ModalViewControlleralloc原创 2013-10-16 22:19:41 · 3166 阅读 · 0 评论 -
IOS UIViewController
1.代码创建//将视图控制器添加到window上代码添加UIViewController *mainViewController = [[UIViewControlleralloc] init];mainViewController.view.backgroundColor = [UIColorredColor];self.window.rootViewCont原创 2013-10-09 01:11:29 · 806 阅读 · 0 评论 -
IOS UIView
//通过xib方式创建视图对象NSBundle *bundle = [NSBundlemainBundle];NSArray *arr = [bundleloadNibNamed:@"myView"owner:self options:nil];UIView *myView = [arrobjectAtIndex:0];//代码创建CGRec原创 2013-10-05 18:43:29 · 1032 阅读 · 0 评论 -
IOS 判断是否第一次进入 并使用navigationController跳转
1.在项目AppDelegate.m文件中didFinishLaunchingWithOptions方法下加入//设置一个存储值,记录是否第一次进入 BOOL isFirst = [[NSUserDefaultsstandardUserDefaults] boolForKey:@"isFirst"]; //判断是否第一次进入 if (!isF原创 2013-10-05 02:49:00 · 1222 阅读 · 0 评论 -
IOS XML解析
xml文件中需要解析的数据节点单个样式 吉祥航空 HO1252 北京首都国际机场 上海虹桥国际机场 06:35 09:00 320 0 123456日 1. 在.h文件中加入协议NSXMLParserDelegate原创 2013-10-05 02:26:52 · 598 阅读 · 0 评论 -
IOS网络请求 ASIHTTPRequest导入
1.类库下载地址ASIHTTPRequest库下载。2.将其中的class文件下的文件全部拷贝到工程中自建的asihttprequest文件夹下。3.导入框架:原创 2013-10-04 02:42:40 · 1043 阅读 · 0 评论 -
storyboard 添加Navigation Controller
之前没想到要用Navigation Controller,开发了一会儿发现还是需要加上。后加Nav的方法如下:1.拖一个 Navigation Controller到storeboard中。2.把其自带的RootViewController删掉。3.右键拖拽将NavigationController与自己的首页ViewController链接起来,并设置为rootViewCon原创 2015-08-28 10:04:31 · 3913 阅读 · 0 评论