<span id="Label3"></p><p><p>For iOS development, Here are some simple personal insights that I hope will help you.</p></p><p><p>1, Pre-ios-ui Development We'd better manage the memory manually, so that we can better understand the system management mechanism, so here is how to create in the MRC environment (xcode off the arc step);</p></p><p><p>(1) open Xcode to select the current project:</p></p><p><p></p></p><p><p>(2) Check Build Settings:</p></p><p><p></p></p><p><p>(3) in the input box, enter count:</p></p><p><p></p></p><p><p>(4) Select Objective-c Automatic Reference counting to set it to NO:</p></p><p><p></p></p><p><p>(5) AppDelegate.h file: @property (assign, nonatomic) uiwindow *window, change to @property (retain, Nonatomic) UIWindow *window;</p></p><p><p>(6) APPDELEGATE.M file Rewrite:-(void) dealloc {[_window release]; [super dealloc]; }</p></p><p><p>2, in the development we will use the simulator below we look at the simulator add step (xcode environment);</p></p><p><p>(1) open Xcode to select the devices under Window:</p></p><p><p></p></p><p><p>(2) Click "+" to select the Simulator Name in the pop-up selection box:</p></p><p><p></p></p><p><p></p></p><p><p>Here are some simple exercises: we can knock on it and learn more</p></p><p><p>Practice One: Create an empty application project and change the background color of the window to red;</p></p><p><p>※ Code (left), Simulator Run effect (right)</p></p><p><p></p></p><p><p>Exercise Two: Create two views on the basis of practice one 1. A background color is set to yellow (yellowview), a background color is set to green (greenview), and 2. Add the view to the window;</p></p><p><p>※ Code (left), Simulator Run effect (right)</p></p><p><p></p></p><p><p>Exercise three: on the basis of practice two, add Greenview to yellowview, analyze the result;</p></p><p><p>※ Code (left), Simulator Run effect (right)</p></p><p><p></p></p><p><p>Exercise four: on the basis of exercise three, revise the center of greenview, analyze the result;</p></p><p><p>※ Code (left), Simulator Run effect (right)</p></p><p><p></p></p><p><p>Exercise Five: Create a new project, creating 5 views (aview, bview, cView, dView, eview)</p></p><p><p>1, window with Addsubview: method successively add Aview and bview;</p></p><p><p>2, window with Insertsubview:atindex: method to add CView between Aview and bview;</p></p><p><p>3, window with Insertsubview:abovesubview: method to add Dview to the top of aview;</p></p><p><p>4, window with Insertsubview:belowsubview: method to add Eview to the bottom of bview;</p></p><p><p>※ Code (left), Simulator Run effect (right)</p></p><p><p></p></p><p><p>Exercise Six: Create a new project, creating a view to add to the window;</p></p><p><p>1, Test Hidden properties;</p></p><p><p>2, Test the Alpha attribute;</p></p><p><p>3, test Superview and Subviews attributes;</p></p><p><p>4, test the Tag property and Viewwithtag: method;</p></p><p><p>※ Code (left), Simulator Run effect (right)</p></p><p><p></p></p><p><p>iOS Development-ui Introductory article</p></p></span>
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.