IOS AutoLayout (i) IB is associated with Viewcontoller

Source: Internet
Author: User

IB has been useless for some time, program this thing often write and use will forget

There is no link between IB and Viewcontroller, but the beginning is wrong. Cause has been crash, really to Xcode said I have what revenge with you, and you have any resentment.

IB is associated with Viewcontroller in a few simple steps:

1, (first create an empty Xib file, and a Uiviewcontroller sub-Class), typing is not clear, then directly

2, file's owner owns the view (note here is not to drag a viewcontroller, is a view, began to think is Viewcontroller, the results of the collapse of the scattered, tears of the lesson! )

3. Method of initialization:democontroller *demo = [[democontroller alloc] initwithnibname:@ " Democontroller " bundle:nil", where Democontroller is the name of Xib don't write wrong, write wrong also will collapse.

IOS AutoLayout (i) IB is associated with Viewcontoller

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.