2012-5-8 18:56:09 阅读1 评论0 82012/05 May8
简单来讲Added two UITableViewController subclasses to the project. (These are trivial and just create NSArray instances containing the strings that are the contents of their tableview rows.)
In the viewcontroller.xib file added two tableview controllers from the Library and set the Class Identity of these to the UITableViewController subclasses I just created in the project.
Dragged the tableviews from these two view controllers into the main view and set their size, position and autoresizing properties.
Unchecked the 'Autoresize View To Fill Screen' checkbox for the controllers.
Added two UITableViewController IBOutlets to the Main View controller's header and hooked these up in IB. This step is critical, although I don't know why. The controllers seem to be built even if these outlets don't exist but the table views don't appear if they don't exist.
Also had to set the view outlet for the table view controllers in IB back to the two table views that are now inside the main view.
It is necessary to check all the connections in IB very carefully. Use the list view mode. Control click on all the objects and inspect the little window that appears showing the outlet connections to see that everything is correct.
2012-5-4 15:59:17 阅读4 评论0 42012/05 May4
2012-5-3 17:56:03 阅读2 评论0 32012/05 May3
2012-4-26 16:02:07 阅读7 评论0 262012/04 Apr26
先创建一个路径,然后根据这个路径创建了一个剪辑区域,接下来所有的绘制都会被限制在这个区域内,绘制在区域外的会不可见CGContextRef ctx = UIGraphicsGetCurrentContext();
CGFloat cornerRadius = 6.;
CGContextSaveGState(ctx);
UIBezierPath *roundedPath = [UIBezierPath bezierPathWithRoundedRect:[self bounds]
cornerRadius:cornerRadius];
CGContextAddPath(ctx, [roundedPath CGPath]);
CGContextRestoreGState(ctx);
CGContextClip(ctx);
2012-4-6 11:18:53 阅读10 评论0 62012/04 Apr6