(ii) iOS app development combat

Source: Internet
Author: User
Second week MVC pattern

C belongs to the bridge function between M and V. V and M are generally not directly connected and do not communicate directly.

Logic to create buttons for the navigation bar, the bottom bar, and the bottom bar
  1. Instantiate a Viewcontroller
  2. Instantiate a navigationcontroller and initialize it with the viewcontroller above.
  3. Set the title, Icon for Navigationcontroller
  4. After repeating the above steps to get enough quantity
  5. Instantiate a Tabbarcontroller
  6. Tabbarcontroller is actually an array, fill the array with the above Navigationcontroller
  7. Set the window's Rootviewcontroller to the Tabbarcontroller
Use the parent class to unify the same set of objects in different Viewcontroller

For example, 5 Viewcontroller need a background map, you can create a baseviewcontroller, which will write a unified background map settings. Then let these different viewcontroller inherit from this Baseviewcontroller, and then write the different parameters in these Viewcontroller respectively--subclasses can call the properties of the parent class directly, it should be noted that the properties of the parent class must be written in the .hin the file.

- (void)viewDidLoad {    [super viewDidLoad];        self.title = @"Two";    self.bgImageView.image = [UIImage imageNamed:@"bg2"];    }

(ii) iOS app development combat

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: info-contact@alibabacloud.com 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.