- 博客(14)
- 收藏
- 关注
转载 类对象序列化
1.使用序列化需要在对象中实现NSCoding协议NSCoding协议方法:encodeWithCoder和initWithCoder,将一个对象序列化需要实现这2个方法。@protocol NSCoding- (void)encodeWithCoder:(NSCoder *)aCoder;-(void)initWithCoder:(NSCoder *)a...
2015-08-10 21:21:00
154
转载 序列化与反序列化(NSDictionary),监听键盘
@interface ViewController ()#define FileName @"Student.plist"#define KName @"KName"#define KBirth @"KBirth"#define KSex @"KSex"#define KNumber @"KNumber"#define KHome @"KHome"...
2015-08-09 23:10:00
204
转载 iOS沙盒
1.每个应用程序都有自己的存储空间。2.应用程序不能访问其他程序的存储空间。3.应用程序请求的数据都要通过权限检测,不符合条件的不被允许。默认,沙盒有3个目录:Documents:应用程序将其数据存储在documents中。Library:基于NSUserDefaults的首选项设置存储在Library/Preferences文件夹中。tmp:临时文件夹,同步时,...
2015-08-09 21:43:00
124
转载 UITableViewCell
1.Push跳转- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *cellKey=@"cellKey"; UITableViewCell *cell = [tabl...
2015-08-06 20:54:00
115
转载 UITableView(支持索引的分组表)
重载函数:-(NSArray *) sectionIndexTitlesForTableView: (UITableView *) tableView{ //dict allKeys取出的key arr无顺序,需进行排序 NSArray *arr = [[self.words allKeys] sortedArrayUsingSelector:@selecto...
2015-08-05 21:33:00
95
转载 UITableView
1.代理 UITableViewDelegate,UITableViewDataSource2.实现代理- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView{ return 1; //分区数,默认为1}- (NSInteger)tableView:...
2015-08-05 20:34:00
110
转载 UIDatePicker,UIPickerView,MultiComponentPicker
UIDatePicker属性:Mode:Date and TimeLocale:Interval:最大值,最小值 NSDate *date=[self.dataPicker date]; NSDateFormatter *formatter=[[NSDateFormatter alloc]init]; [formatter set...
2015-08-03 22:20:00
106
转载 UITabBarController
1.组成最下层是:tabbar 中间是:custom content 最上面:Tab bar controller viewTab Bar上面显示的每一个Tab都对应着一个View Controller.ViewController本身具有一个tabBarItem属性,只要设置它,就能改变Tab Bar上对应的显示内容。如果不主动设置,系统将会根据viewControl...
2015-08-03 16:29:00
85
转载 动画 animation
[UIView beginAnimations:@"trun" context:nil];//开始一个动画 [UIView setAnimationDuration:1]; //动画的时间 [UIView setAnimationCurve:UIViewAnimationCurveEaseInOut];//动画的曲线...
2015-08-01 23:04:00
99
转载 委托,协议(代理模式)
1.delegate传值,传事件。1、避免子类化带来的过多的子类以及子类与父类的耦合2、通过委托传递消息机制实现分层解耦eg.代理#import <Foundation/Foundation.h>@class Children; @protocol ChildrenDelegate <NSObject> @req...
2015-08-01 15:46:00
137
转载 UISwitch,UISegment
1.UISwitch 开关2.UISegment 分段控件转载于:https://www.cnblogs.com/iOS-Code/p/4693955.html
2015-08-01 12:51:00
102
转载 UISlider,UIProgressView,NSTimer
UISlider:滑块属性:minimumValue,maximumValue 最小值为:0.0 最大值为:1.0事件:valueChange事件UIProgressView:进度条属性:progressNSTimer:计时器[NSTimer scheduledTimerWithTimeInterval:0.5 target:self selector:@sele...
2015-07-31 11:14:00
141
转载 UIAlertView 简单介绍
1.实例化 UIAlertView *view=[[UIAlertView alloc]initWithTitle:@"Title" message:@"message" delegate:self cancelButtonTitle:@"Cancel" otherButtonTitles:@"other", nil]; 如果需要监听弹出以后的点击事件,需要设置代理 ...
2015-07-30 20:50:00
139
转载 iOS UITextField使用介绍
委托1.将要开始编辑- (BOOL)textFieldShouldBeginEditing:(UITextField *)textField{return YES;}2.- (void)textFieldDidBeginEditing:(UITextField *)textField{//开始编辑时触发,文本字段将成为first responder...
2015-07-30 16:51:00
108
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人
RSS订阅