#import "ViewController.h"#import "Student.h"@interface ViewController (){ NSArray *_dataArray; //负责应用与数据库交互 NSManagedObjectContext *_context...
分类:
其他好文 时间:
2015-09-13 21:24:15
阅读次数:
145
//创建数组存放选项信息 NSArray *array=[[NSArray alloc]initWithObjects:@"one",@"two",@"three", nil]; //初始化 UISegmentedControl *segment=[[UISegmentedControl alloc...
分类:
其他好文 时间:
2015-09-13 14:38:51
阅读次数:
261
UIView:用来展示用户的界面,响应用户的操作(继承自UIResponder)UIView的作用:绘图、动画、处理事件UIView可以包含和管理子视图,并且决定子视图的位置大小获取所有的子视图(数组)NSArray *subViews= self.window.subviews;将子视图放在某个子...
分类:
其他好文 时间:
2015-09-12 23:39:46
阅读次数:
208
NSMapTable、NSHashTable与NSPointerArray的封装说明NSMapTable对应NSDictionary;NSHashTable对应NSSet;NSPointerArray对应NSArray,本人通过装饰设计模式对他们的使用进行了封装。源码https://github.c...
分类:
其他好文 时间:
2015-09-12 18:54:23
阅读次数:
255
NSHTTPCookieStorage *sharedHTTPCookieStorage = [NSHTTPCookieStorage sharedHTTPCookieStorage]; NSArray *cookies = [sharedHTTPCookieStorage cookiesForU....
分类:
其他好文 时间:
2015-09-12 09:37:29
阅读次数:
139
一、UISegmentControl是一个分段控件,父类是UIControl,内涵数个button,并且都有对应下标index; NSArray *titles = @[@"护卫队",@"三军仪仗队",@"步兵方队",@"炮兵方队"]; UISegmentedControl *Segmente...
分类:
其他好文 时间:
2015-09-11 22:00:18
阅读次数:
244
TableView+ScrollView往cell里加label解决重影的办法重用cell的时候删除元素 NSArray *subViews = cell.subviews; for (UIView *view in subViews) { [view removeFromSuperview...
分类:
其他好文 时间:
2015-09-11 20:46:50
阅读次数:
129
1 #import "ViewController.h" 2 3 @interface ViewController () 4 { 5 UIScrollView *_scrollView; 6 } 7 //数据源 8 @property (nonatomic,strong)NSArray...
分类:
移动开发 时间:
2015-09-11 20:44:28
阅读次数:
207
1、通过xib文件创建自定义cellViewController.h #import @interface ViewController : UITableViewController@property (strong, nonatomic) NSArray *listTeams;@end Vi.....
分类:
其他好文 时间:
2015-09-11 16:00:32
阅读次数:
186
@property(nonatomic,strong) NSArray *pic; //创建数组属性@property(nonatomic,assign) int index; //创建索引属性@property (strong, nonatomic) IBOutlet UIImageView...
分类:
移动开发 时间:
2015-09-11 09:15:11
阅读次数:
194