Sujeev's Tech Blog

Monday, October 25, 2010

Typecasting in iOS

example:

@interface mytype : XYZtype {
}
.
.
.
mytype *abc = [some_function];

in the above syntax if some_function returns a type of XYZtype then the following is correct.

mytype *abc = (mytype *)[some_function];

0 Comments:

Post a Comment

<< Home