App crashes when i use nsmutablestring iOS swift

  Solution:

@property (nonatomicassignNSMutableStringstr;


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 (nonatomicweakNSMutableStringstr;


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

Popular posts from this blog

Invalid bundle error while upload the app to the app Store

Saved Image in document directory and save path in coredata not able to fetch the image file iOS swift