This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (NSNumber *)badgeNumberForNotificationsJson:(NSDictionary *)json { | |
return ([[json objectForKey:kToast] objectForKey:kNotificationNumber]); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (NSNumber *)badgeNumberForNotificationsJson:(NSDictionary *)json { | |
return ([[json dictionaryForKey:kToast] numberForKey:kNotificationNumber]); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (NSInteger)badgeNumberForNotificationsJson:(NotificationsDataModel *)model { | |
return model.toast.notificationNumber; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"toast": { | |
notificationNumber: 3, | |
notificationText: "John Appleseed invited you to connect" | |
}, | |
"updateBadge": true, | |
"memberId": "134241252", | |
"connectionDistance": 3 | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@interface NotificationDataModel | |
@property (nonatomic, strong) NotificationToastModel *toast; | |
@property (nonatomic) BOOL updateBadge; | |
@property (nonatomic, strong) NSString *updateBadge; | |
@property (nonatomic) NSInteger connectionDistance; | |
@end | |
@interface NotificationToastModel |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NotificationDataModel *model = [jsonDictionary isc_objectFromJSONWithClass:[NotificationDataModel class]]; | |
[self updateNotificationCount:model.toast.notificationNumber]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@implementation NotificationDataModel | |
@end | |
@implementation NotificationToastModel | |
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (id)copyWithZone:(NSZone *)zone { | |
LIProfilePersonModel *copy = [LIProfilePersonModel new]; | |
copy.headline = self.headline; | |
copy.defaultLocale = self.defaultLocale; | |
copy.locationValue = self.locationValue; | |
copy.originalPicture = self.originalPicture; | |
copy.location = self.location; | |
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class func dataSpecForTest() -> [NSObject: AnyObject] { | |
return [ | |
"text": LYTStringValues(), | |
"buttonText": LYTStringValues(), | |
"buttonEnabled": LYTBoolValues(), | |
"imageType": LYTDataValues(values: ["linkedin", "customValue", NSNull()]) | |
] | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//: Playground - noun: a place where people can play | |
import UIKit | |
// PROTOCOL | |
protocol Foo { | |
func foo() -> String | |
func baz() -> String | |
} |
OlderNewer