来源:http://www.cnblogs.com/ygm900/p/3652890.html1,UIView的setNeedsDisplay和setNeedsLayout方法首先两个方法都是异步执行的。而setNeedsDisplay会调用自动调用drawRect方法,这样可以拿到 UIGraph...
分类:
其他好文 时间:
2015-02-04 14:25:20
阅读次数:
88
来源:http://www.cnblogs.com/pengyingh/articles/2381673.html#30923051.UIView是iOS系统中界面元素的基础,所有的界面元素都继承自它。它本身完全是由CoreAnimation来实现的(Mac下似乎不是这样)。它真正的绘图部分,是由一...
分类:
其他好文 时间:
2015-02-04 14:21:53
阅读次数:
94
//从主view删除- (void)removeFromSuperview;//插入到指定索引位置- (void)insertSubview:(UIView *)view atIndex:(NSInteger)index;//交换两view的索引位置- (void)exchangeSubviewAtIndex:(NSInteger)index1 withSubviewAtIndex:(NSInte...
分类:
其他好文 时间:
2015-02-03 23:06:46
阅读次数:
204
iOS开发中,常常由于需求,而需要圆角的样式.如果4个角都是圆角的,还好说.一行两行代码就可以搞定.就是CAlayer.可是现在我想说下不规则的圆角.目前我还没有找到更好的方法来画圆角.希望有解决方法的朋友看到这篇文章,能交流学习下. 目前在项目中用到的圆角. 是UIBezierPath类的方法,强...
分类:
移动开发 时间:
2015-02-03 22:54:49
阅读次数:
239
1.File’s Owner为nil UIView *demo1 = [[[NSBundle mainBundle] loadNibNamed:@"demo1" owner:nil options:nil] lastObject]; CGRect rect = demo1.frame; rec...
分类:
移动开发 时间:
2015-02-03 20:59:18
阅读次数:
565
UIView : UIResponder + (Class)layerClass;- (instancetype)initWithFrame:(CGRect)frame;//是否可点击@property(nonatomic,getter=isUserInteractionEnabled) BOOL ...
分类:
其他好文 时间:
2015-02-03 14:42:04
阅读次数:
134
iOS8:UITableViewCellContentView->UITableViewCell->UITableViewWrapperView->UITableView->UIView->UIViewControllerWrapperView->UINavigationTransitionView...
分类:
移动开发 时间:
2015-02-03 14:33:05
阅读次数:
204
A.UIWindow概念1.继承UIView,是一种特殊的UIView2.通常一个APP只有一个UIWindow3.iOS程序启动后,创建的第一个视图就是UIWindow4.没有UIWindow,不能显示任何东西B.使用1.创建一个Empty Application项目没有了storyboard,要...
@interface YGSectionHeaderView : UIView@property NSUInteger section;@property (nonatomic, weak) UITableView *tableView;@end@implementation YGSectionHe...
分类:
移动开发 时间:
2015-01-31 23:12:23
阅读次数:
217
前段时间遇到一个问题,navigation上的左侧返回按钮需要自定义,于是就给了一个view上去 代码如下 UIView *leftitleView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 200, 54)]; [leftitle...
分类:
其他好文 时间:
2015-01-30 14:38:12
阅读次数:
145