随笔分类 -  iOS storyboard

对iOS在项目执行中进行学习,记录
摘要:自大iOS8推出了tableview自适应高度,我就一直想试试,刚好手上有个新闻的app需要用到就尝试了下。使用流程很多博客上都有提,在storyboard中拉一个cell然后把里面的元素都设置好约束。这个我常做,注意最后一个元素要设置到底部的约束。在storyboard中我没有将打上勾然后结果就是... 阅读全文

posted @ 2015-08-04 10:55 cillyfly 阅读(287) 评论(0) 推荐(0)

摘要:修正方案,之前的方案方案会导致队列不断增加,这边需要注意的是,当view为nil时 不会调用removeFormSuperView 所以这个时候不会出现异常。队列不断增加会导致内存溢出。- (void)clickToChose:(id)sender{ UIButton *button = (UIButton *)sender; oneViewController *oneView = [self.storyboard instantiateViewControllerWithIdentifier:@"one"]; twoViewController *twoView = [ 阅读全文

posted @ 2014-03-26 11:22 cillyfly 阅读(166) 评论(0) 推荐(0)

摘要:UISlide可以利用 【uislide setThumbImage: forState】 来设置中间的指针。 阅读全文

posted @ 2014-02-28 16:58 cillyfly 阅读(181) 评论(0) 推荐(0)

摘要:// 滑动手指的个数numberOfTouchesRequired// 手指滑动的方向 (Up,Down,Left,Right)directionUISwipeGestureRecognizer*swipeGestureRecognizer=[[UISwipeGestureRecognizeralloc]init];[swipeGestureRecognizeraddTarget:selfaction:@selector(gestureRecognizerHandle:)];[swipeGestureRecognizersetNumberOfTouchesRequired:2];[swipeG 阅读全文

posted @ 2014-02-28 16:56 cillyfly 阅读(691) 评论(0) 推荐(0)

摘要:1.添加UITextFieldDelegate2.添加此方法-(void)animateTextField:(UITextField*)textField up:(BOOL)up{ constintmovementDistance =80; constfloatmovementDuration =0.3f; intmovement = (up?-movementDistance:movementDistance); [UIViewbeginAnimations:@"anim"context:nil]; [UIViewsetAnimationBeginsFromCurrent 阅读全文

posted @ 2014-02-28 11:54 cillyfly 阅读(245) 评论(0) 推荐(0)

摘要:首先需要确认storyboard中的tableviewcell的类型为prototypes,这个类型是原型类型。然后利用tag对cell中的内容进行标注,当然这里需要标注的是需要进行修改的内容。 阅读全文

posted @ 2014-02-19 09:40 cillyfly 阅读(247) 评论(0) 推荐(0)