1.UILable content Blur
On the screen of a non-retina ipad Mini, the origin value of a uilable frame, if it has a decimal place (such as 0.5), causes the display to blur, so it is best to use the origin of the integer value.
2. Cancel the keyboard response
Resignfirstresponder is usually used to cancel keyboard response events, but there are three ways to cancel the keyboard response.
First: Overload the Touchesbegin method in the Uiviewcontroller, and then execute [self.view Endediting:yes] in the inside, then click anywhere in the Uiviewcontroller to cancel the keyboard response.
Second type: direct execution [[uiapplication sharedapplication] sendaction: @selector:(resignfirstresponder) To:nil From:nil Forevent:nil ]; Used when getting the current uiviewcontroller is more difficult.
The third type: direct execution [[[UIApplication sharedapplication] Keywindow] endediting:yes];
3. Screen cutting function
the screenshot function of IOS can save the UI elements of the current page to UIImage, which can be used in the system-provided API for applications above IOS7:-(UIView *) Snapshotviewafterscreenupdates: (BOOL) afterupdates to achieve the screenshot function, for applications below IOS7 can be implemented by the following code to achieve the screenshot function:
iOS7 screenshot Method-(UIImage *) Captureimagefromview: (UIView *) view{ CGRect screenrect = [view bounds]; Uigraphicsbeginimagecontext (screenrect.size); Cgcontextref CTX = Uigraphicsgetcurrentcontext (); [View.layer Renderincontext:ctx]; UIImage *image = Uigraphicsgetimagefromcurrentimagecontext (); Uigraphicsendimagecontext (); return image;
Fat says things-----iOS Development Tips Cancel keyboard response and screenshot function