02 2016 档案
摘要:1.创建继承自UICollectionViewCell的l类ImageCell,将imageView和label声明成属性,然后重写- initWithFrame:方法,初始化内部控件 - (id)initWithFrame:(CGRect)frame { self = [super initWit
阅读全文
摘要:1.UISegmentControl 1)先创建一个数组用来存放标题 NSArray *array = @[@"1",@"2",@"3",nil]; UISegmentedControl *segmented = [[UISegmentedControl alloc] initWithItems:a
阅读全文
摘要:1.//当手指在屏幕上滑动时 - (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event{ UITouch *touch = [touches anyObject]; CGPoint previousPoint = [touch
阅读全文
摘要:1.首先在自定义的视图中重写layoutSubviews方法 - (void)layoutSubviews{ UIInterfaceOrientation orientation = [UIApplication sharedApplication].statusBarOrientation ;//
阅读全文

浙公网安备 33010602011771号