Nine Gongge layout

Source: Internet
Author: User

Nine Gongge layout. h
iOS notes

-(void) createui{
Nsarray *titles = @[@ "My Settings", @ "My concerns", @ "My account", @ "My favorites", @ "My downloads", @ "my comments", @ "my help" @ "my App"];

Nsarray *images = @[@ "setting", @ "favorite", @ "user", @ "collect", @ "Download", @ "comment", @ "Help", @ "Candou"];

for (int i=0; i<titles.count; i++) {
CGFloat buttonw = (kscreenrect.size.width-30*4)/3.0;
int H=I/3;
int l=i%3;
CGFloat Butonx = (buttonw +30) *l+30;
CGFloat butony = (buttonw +30) *h+64+30;

Wqdbutton *button = [Wqdbutton addbuttonwithframe:cgrectmake (Butonx, Butony, Buttonw, buttonw) Title:nil andBlock:^{

if (3==i) {
Collectionviewcontroller *collection = [[Collectionviewcontroller alloc]init];
[Self.navigationcontroller pushviewcontroller:collection Animated:yes];
[Button setbackgroundimage:[uiimage imagenamed:[nsstring stringwithformat:@ "account_%@", Images[i]]] ForState: UIControlStateNormal];
[Self.view Addsubview:button];

UILabel *label = [UILabel labelwithframe:cgrectmake (Butonx, Butony+buttonw, Buttonw, () andtitle:titles[i]];
Label.font =[uifont Systemfontofsize:9];
[Self.view Addsubview:label];



Nine Gongge layout

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.