1. The transparency property of the parent view is passed to the child View 2.iPad program that can run the iphone iphone cannot run the ipad program 3. Decide whether it's an ipad or an iphone
if (ui_user_interface_idiom () = = Uiuserinterfaceidiompad) {
NSLog (@ "IPad");
} else {
NSLog (@ "IPhone");
}
4.//Determine the version number of the system
if ([[Uidevice currentdevice].systemversion Floatvalue] > 7.0) {
NSLog (@ "%@", [Uidevice currentdevice].systemname); }5 Self in the + method the object of the class name in the-method middle finger
1.isEqual don't know why it's not possible to tell if an object is a class
For Example
if ([[[[array1 objectatindex:0] class] isequalto: [nsstring Class]])
{
NSLog(@ " is nsstring type ");
}
This method is wrong ? ;
2. Problems found during the registration of a demo login
Why use the Get () function in the program to obtain character production, you can not use the NSLog function to print it. ????????????????????
That's because you don't use pointers to arrays when defining strings.
For example char *str; ?
Char str[100] ?
3.???????????????????
Note that to add elements to a variable group, you must initialize the variable element, or it will not increase .
For example nsmutablearray *array = [nsmutablearray arraywithcapacity:0];?
Nsmutablearray *array = nil ?
4. When the database uses parameter SQL statements
You cannot call the exec function using the step function to remember 3???????????????????
5. Modify Barbuttonitem's Outlook This method sets all changes to global settings at once
Uibarbuttonitem *appearancebarbutton = [uibarbuttonitem appearance];
nsmutabledictionary *dict = [nsmutabledictionary dictionary];
dict[nsforegroundcolorattributename] = [uicolor redcolor];
[Appearancebarbutton settitletextattributes:d ICT forstate:uicontrolstatenormal];
6// when using class for the first time call
+ (void) Initialize
{
if (self = = [Self class]) {
}
}
7// Set the secondary view of the keyboard
Uitextfield *textfield = [[uitextfield alloc] init];
TextField. Inputaccessoryview = [[UIView alloc] init];
8// picture stretching
UIImage *newimage = [Image resizableimagewithcapinsets:uiedgeinsetsmake( , (a );
9 btn. adjustsimagewhenhighlighted = no;// indicates that the picture does not change color when the button is highlighted
10.NSClassFromString (< #NSString *aclassname#>)// convert String to class name
Tableviewcontroller seems to be able to achieve automatic refresh function is not very sure yet to be confirmed
iOS development of a variety of small knowledge