iOS Development notes (ii)

Source: Internet
Author: User

The Identity Inspector Key path can be used to make rounded buttons and borders.

Layer.cornerradius Number Fillet button

When using proxy mode, be aware that references between A and B are circular, causing memory to not be recycled. You can set the reference to weak. The Navigationbar is transparent by default, and the color is Gaussian blurred. So directly with the RGB color assignment, the final color effect will be slightly lighter. Solution: The first Navigationbar is set to opaque. ios3.0 after the Apple SDK for this situation has been adjusted, if it is a POST request, and set the Httpbody, then the request time-out is set to 240 seconds by default. Even if you use [URLRequest settimeoutinterval:10] again, and it is invalid, we can then read the value again after setting it up, and find that it will not become 10 and remain for 240 seconds. Presentviewcontroller and The difference between Uinavigationcontroller: Presentviewcontroller generally used for a viewcontroller at the same time, dismiss will make all the presents's view disappear. (go back, inconvenient)
Uinavigationcontroller is more flexible, can push, and then pop. Highly dynamic generation of UITableViewCell, Return Cell.contentView.systemLayoutSizeFittingSize (uilayoutfittingcompressedsize). Height + 1. This systemlayoutsizefittingsize can be used to test the height. (Fill in the data first, after the initialization, call this interface to return the corresponding height)How other threads operate (update) the UI.

[Self Performselectoronmainthread: @selector (updateUI:) withobject:image Waituntildone:yes];

Performselectoronmainthread is the NSObject method, in addition to updating the main thread's data, you can also update other threads such as:By: PerformSelector:onThread:withObject:waitUntilDone:

There are three ways of layout: Manual layout,autoresizing,autolayout. We may use the following two kinds.

Suppose V1 is a view that does not use a AutoLayout, and V2 is a view that uses AutoLayout, but V1 becomes v2 subview,

V2 requires four hidden constraint to determine the position of the V1, which are converted from the V1 frame:

This conversion was performed only if the view in question have its translates-

Autoresizingmaskintoconstraints property set to YES. That's, in fact, the default if

The view came into existence either in code or by instantiation from a nib where ' use

Auto Layout "is not checked. The assumption is, if a view came into existence in

Either of those ways, you want it frame and autoresizingmask to act as its constraints

If it becomes involved in AutoLayout. Can I call Prepareforsegue data back and forth in destination controller? No. Because: Prepareforsegue can be used only when a controller is placed on top of the stack, and if a controller is removed from the stack, it is not available and has a unidirectional nature. self.navigationController popToRootViewControllerAnimated:YES]
UIViewController *prevVC = [self.navigationController.viewControllers objectAtIndex:<n>];[self.navigationController popToViewController:prevVC animated:YES];

[self.navigationController popViewControllerAnimated:YES];

Remove the child's action if you are implementing your own container view controller, it must call the willMoveToParentViewController:Method of the child view controller before calling the removeFromParentViewControllerMethod ...

Thus, as discussed in Adding and removing a child section of the "View Controller programming Guide" when removing A child, we should:


[childVC willMoveToParentViewController:nil];
[childVC.view removeFromSuperview];
[CHILDVC Removefromparentviewcontroller];

iOS Development notes (ii)

Related Article

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.