"Assignment from distinct type" warning message
I am getting the following warning:
assignment from distinct objective-c type
How d开发者_C百科o I fix this?
There are many ways to get this error, so it's helpful if you post some code... That said, you're probably doing something like:
UIView *bladyblah;
bladyblah = [[MyViewType alloc] init];
i.e. assigning an object of one type into a variable of another type. the fix is either to change the type of the variable, or do a type cast like so:
bladyblah = (UIView *)[[MyViewType alloc] init];
You have to check the correctness of the types you are assigning and if needed you have to do an operation of casting! If you post your code it's more easy to help you!
精彩评论