App crashes when i use nsmutablestring iOS swift
Solution:
@property (nonatomic, assign) NSMutableString* str;
When i use the above line try to run the app it crashes.
Because it's a mutable value.. NSMutableString and NSString are came from nsobject with mutble value..
@property (nonatomic, weak) NSMutableString* str;
You must have to use like above the app will works fine..You cannot be able to assign a value to the mutated objects.You must use that as weak property..
Happy coding...
Comments
Post a Comment