记录几个还算常用的Tips,不定期更新

2016-12-06  本文已影响17人  MonkeyBread
 [label setContentHuggingPriority:UILayoutPriorityRequired
                           forAxis:UILayoutConstraintAxisHorizontal];
[label setContentCompressionResistancePriority:UILayoutPriorityRequired 
                                         forAxis:UILayoutConstraintAxisHorizontal];
RunLoopMode:
NSTimer *timer = [NSTimer timerWithTimeInterval:1.0
                                           target:self
                                         selector:@selector(timerTick)
                                         userInfo:nil 
                                          repeats:YES];
[[NSRunLoop currentRunLoop] addTimer:timer 
                               forMode:NSRunLoopCommonModes];
UIImageView *imageView = [[UIImageView alloc] init];
UIImage *image = [UIImage imageNamed:@"imageIcon"];
[imageView performSelector:@selector(setImage:)
                  withObject:image
                  afterDelay:0
                     inModes:@[NSDefaultRunLoopMode]];
https://github.com/waynezxcv/Gallop/issues/34
上一篇 下一篇

猜你喜欢

热点阅读