There is an NSStirng type. What is the role of each line of code in the setter method of the name attribute declared by retain ?, Nsstirngsetter
-(Void) setName :( NSString *) name {
Determine whether the original object and the new object are the same object. If it is the same, there is no need to re-assign values. Otherwise, it will be release first and then retain, and it will become a wild pointer.
If (_ name! = Name ){
Release the ownership of the previous object
[_ Name release];
Let the instance variable _ name retain the ownership of the new object
_ Name = [name retain];
}
}
There is no answer to all questions about iphone interviews on the market.
6 retina assign readonly readwrite write
7. If this is the sizeof of c, it is the memory size of an object. strlen is the string lenth, that is, a string contains several characters.
8. protocol defines the equation and can be instantiated by reload as needed.
9
NSMutableArray * A; // your array
NSMutableArray * B = [NSmutableArray alloc] init];
Int temp = 0;
Int size = A. size;
For (int I = 0; I <size; I ++)
{
For (I in)
{
If (I> temp)
Temp = I;
}
[B addobject: temp]
[A remove (temp)];
}
10
An interface is an object class that contains class methods and members.
Property is all members of this class.
11
What is the control thing? Controller, iOS is developed in mvc mode. controller is generally used to define data operation methods or to obtain user input data.
13
A custom control is an NSobject with a view and a delegate to respond to the input shells of various I users.
14
No
15
No one will be okay,
One is do recycling first, and the other is loop first and then do
16
While (1)
17
When autoreless is set for an object, the system can delete it when it is not in retain state. Of course, if memory is still empty, it will still be there.
18
Different from java, memory enables you to control and reclaim the pool of autoreless, not gc.
19
What is KVO? There are two types of notification, one is local, the other is push, and the qq things use push notification, and the like use local.
21
No. Use protocol.
23-25 check C Language
26. It is managed by myself like the C language, but autoreless is as I mentioned in the previous 17.
28 view controller delegate. This is too basic and too much to explain.
30 C Language
31. The m of mvc is data, and the c is the communication station between graphs and data. Please yy it yourself.
32.
33 @ property (retain) UIView * myview;
34. What does this mean?
35. I have an iphone programming model book. I just need to search it and read it myself.
36. drawRect draws a square and layout is in the subview;
38 C language questions, iphone direct NSURLconnection, regardless of your tcp or udp ah
39 windows. Fuck, I have never seen anyone using window controller. viewcontorler is enough big brother.
41 NSString * path = [[file getinfo] path]... the remaining full text>