I want to declare nsstring in uiviewcontroller.h file and use this string as whole uiviewcontroller , we want to set and get string values using these strings. I defined viewcontroller .h file like this
NSString *SelectedString;
For some time it released string values and crashes app nothing shows in log.
can anyone help me ?
Are you trying to declare this as a public ivar? (instance variable) of your UIViewController .. ?
You would need something like for example:
(header)
(implementation file)
That’s the basic memory management. If it’s crashing somewhere in runtime, you need to clarify…how are you assigning strings/values and utilising the variable?