Single-View Controller of blue ou iOS training -- FirstApp

Source: Internet
Author: User

The opportunity is by your side, and you can catch it with one hand, but if you leave without turning, it will slide from your side, it depends on whether you can grasp every opportunity, whether you can grasp every opportunity for learningIOS TrainingThis is an opportunity you deserve to seize! How can I create a view controller?

I. Create a View Controller

1. Select File> NewFile. Then select CocoaTouchClasses and then UIViewController-subclass. However, be sure to check the option "WithXIBforuserinterface" in the Options area and name it "MeiShiTianDi. Three files have been generated (*. h ,*. m ,*. xib), in the view of the New View Controller (MeiShiTianDi. (xib) add some buttons.

2. Add the Controller attribute of the label bar to lvyouAppDelegate. h -- (the previous step has been completed !)

3. In the lvyouAppDelegate. m file-(BOOL) applicationUIApplication *)
Applicationdidfinishlaunchingwitexceptionsnsdictionary *) in the launchOptions method, create a tag bar controller in code mode, initialize the Controller at the same time, and then place the two controllers you created on the tag controller.

Because it was the first time I shared my knowledge with you, I would like to give you a brief introduction. If you like me, please stay tuned to the Daily News and share with you about iOS training,IOS developmentFor more information, see today!

This article from "Zhang Hao blog" blog, please be sure to keep this source http://7838271.blog.51cto.com/7828271/1298705

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.