I decided to write it backwards.
7. Add a border to the Collectioncell or give any view border method
- (ID) initWithFrame: (cgrect) frame{ Self=[Super Initwithframe:frame]; if(self) {//load Collectioncell.xib file when initializingNsarray *arrayofviews = [[NSBundle mainbundle] loadnibnamed:@"Classesviewcell"owner:self Options:nil]; //if the path does not exist, return nil if(Arrayofviews.count <1) { returnNil; } //If the Xib view does not belong to the Uicollectionviewcell class, return nil if(! [[Arrayofviews Objectatindex:0] Iskindofclass:[uicollectionviewcellclass]]) { returnNil; } //Load NIB Self= [Arrayofviews Objectatindex:0]; CGFloat borderWidth=2.0f; Self.layer.borderWidth=BorderWidth; Self.layer.borderColor=[uicolor Colorwithwhite:0.5fAlpha1.0f]. Cgcolor; } returnSelf ;}
These days to do the front end to come up with an experience:
The first: fation design is not good to do, need to have "wit" the mind with the existing rules to build ... For example, the side-slip this, Apple has no framework, developer abruptly made a industry standard to ... For example TableCell also has no interval API, but still do the same effect.
The second: Now that you've joined IPhone6 and 6P, you're going to have to be bound to the fucking constraints all day ... I'm going to puke (the Android party definitely says hehe) ... Do the iOS front-end pay is not up
There is an interval between 1.TableViewCell: Use Sectionheader as an interval to cancel the viscous effect of sectionheader under NavBar:
Custom Sectionheader
-(UIView *) TableView: (UITableView *) TableView viewforheaderinsection: (nsinteger) section{ * Sectionheader=[[uiview Alloc]initwithframe:cgrectmake (00)]; return sectionheader; }
2.TableView hides the cell without data and adds a wired background: (I don't know if there's a better way)
Self.tableView.separatorStyle = Uitableviewcellseparatorstylenone;
3.TableCell in the Xib layout size will be AutoLayout bad. Slice size will be autolayout, want to fix can use inheritance directly written in TABLECELL.M
(I don't feel very good, OK?) )
-(void) layoutsubviews{ [Super layoutsubviews]; Self.imgview.bounds=cgrectmake (ten,ten,()); Self.imgview.frame=cgrectmake (ten,ten,()); = Uiviewcontentmodescaleaspectfill;}
4. Quick access to the width of the interface
Cgrectgetwidth (Self.view.bounds)
5.navigationbar color settings: (transparency is not transparent is the primary color, otherwise change, reference http://www.cocoachina.com/industry/20131024/7233.html)
The correct function is:
[Self.navigationController.navigationBar Setbartintcolor:[uicolor Browncolor];
6. Set tab bar color can be written in Appdelegate (http://www.ui.cn/project.php?id=39325)
[Self.tabbar Settintcolor:[uicolor Whitecolor]; // set the hint color [Self.tabbar Setbartintcolor:[uicolor Browncolor]; // set the background color to have a bar!
[IOS Front-end notes + tips]