New changes in iOS9 programming Gogogo:xcode7

Source: Internet
Author: User

Do a demo about Stack view Uistackview, first look at the changes of XCode7

About Storyboard:

Start screen changed from Xib to storyboard

Storyboard References:
It is now possible to add a reference to another storyboard in a storyboard, switching between multiple SB without having to write the code again.

The way it used to be (SWIFT):

override func viewDidLoad() {        super.viewDidLoad()        var sb : UIStoryboard        let del = UIApplication.sharedApplication().delegate as! AppDelegate        "LaunchScreen", bundle: nil)        del.window?.rootViewController = sb.instantiateInitialViewController()    }

Now drag the corresponding action directly to the storyboard reference you want to jump to

About Stack Views:
1. Drag and drop some controls out:


2. Select the controls and click the New button to the left of the Autolayoutbutton group. stack!


3. They are grouped into a vertical stack view (p.s. Stack view can only be selected horizontally or vertically two)


4. Change the view axis of the stack. Change to a level to see the effect:


5. So that the spacing between the controls does not come out, we change the distribution properties. Change from fill to equal spacing, and then to a value of 20, the control itself actively at a distance of 20 to hash the entire stack view


6. It is also possible to unify the alignment, for example the vertical stack. Uniform left-aligned. Effect:

7. Create a socket for this stack view to see how to manipulate its sub-views with code:

8. Get its child view returns an array of sequential views through the Arrangedsubview property:

9. Take the 1 subscript of this array. So that's the slider, change his value to 0.9. Then the execution will slide to 90% places:

New changes in iOS9 programming Gogogo:xcode7

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.