BenAY BenAY - 1 year ago 146
Swift Question

How to get initwithDictionary data into NSObject?

I created nsobject class but I dont know objective c method convert swift 2.How to call nsobject method other viewcontroller? and how to write this method with swift 2?

Sample Objective-C code:

self=[super init];
if (self) {
NSString*action=[data objectForKey:@"action"];
NSString*status=[data objectForKey:@"status"];

if (NotNull(status)) {
self.status=[status intValue];
if (NotNull(action)) {
return self;

Can you help me about this subject?
thank you.

Answer Source
init(dictionary : [String : AnyObject]) {

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download