1, version of the new features
1.1 Interface
The first time the program starts, it will pop up a new feature interface, which will not appear after startup.
1.2 Realization Ideas
1> Create a new Hwnewfeatureviewcontroller (Inherit from Uiviewcontroller)
2> first set it as the root controller for the entire program to demonstrate
3> using Uiscrollview
4> adding Uipagecontrol
5> set Uiscrollview agent, listen for scrolling, set Uipagecontrol
2. Switch the controller
2.1 View In a view showing the other controller
Create a new Hmtestviewcontroller (Inherit from Uitableviewcontroller), put the test data on it, and add it to the view of the other controller
note 1 : The code above will not hmtestviewcontroller view hmtestviewcontroller After creation is a local variable, the code is destroyed after execution, although hmtestviewcontroller view view hmtestviewcontroller was destroyed, so no one gave tabview provide data!
Note 2 : Workaround: Strong pointer Reference Hmtestviewcontroller
Note 3 : If you find the controller's View still here, but View the above data is not displayed, it is probably because the controller was destroyed prematurely
Note 4 : If a controller is destroyed, but its View Has not been destroyed, it will be very dangerous!!! Because a controller is usually used to listen to the view event, once the controller is destroyed,theview needs to handle the event when it will cause bad memory access!!!
2.2 Controller Switching interface
Click on different buttons to switch between different controllers displayed on the same view
2.3 Realization Ideas
1> lazy Load Three controllers, set the view frame for each controller
2> Click the button to add to the view, notice that the previous view is removed to prevent it from being added
2.4 Similar Applications
Note 1 : A controller's View It is possible to adjust the size and position freely.
Note 2 : A controller's View is free to add to other View in
Note 3 : If a controller's View , add to other View , then find a way to ensure that the controller is not destroyed.
Note 4 : Principle: As long as View in the, View Where the controller must be, so that you can guarantee View internal data and business logic are normal
3, [email protected] picture loading
/span>
1th version of the new feature, start to display full screen picture of the adaptation problem!
note 1 : Only for full-screen picture loading at startup!
universal:iphone and ipad, here you can cancel!
note 2 : Only full screen pictures need to focus on screen adaptation problems, other like button pictures can be solved by stretching!
4, Tabbar the use of attention---important
5, the use of button details
5.1 Interface
Version new features last page
5.2 Realization Ideas
Note: edgeinsets
contentedgeinsets: affects all content inside the button (ImageView and Titlelabel)
titleedgeinsets: affects only the inside of the button Titlelabel
imageedgeinsets: affects only the inside of the button ImageView
6, the control can not see the possibility
7. New version Judgment
New features last page, click to start Weibo
8. OAuth Authorization
8.1 Basic Concepts
OAuth (open authorization) is an open standard.
Allow third-party websites to access various information stored by the user at the service provider, subject to user authorization. This authorization does not require the user to provide a user name and password to the third party website.
OAuth allows a user to provide a token to a third-party web site, a token corresponding to a specific third-party site, and the token can only access specific resources for a specific period of time.
Reference URL: Click the Open link to open the link
8.2 Loading the login interface
Note: You need to modify AFN Source Code ( Support response header )
iOS Development-No. 05-Project-03-Version new features & OAuth authorization