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
PlaylistUITabBarController *tabBarController = [[PlaylistUITabBarController alloc] init]; | |
//playlist ^^ is the subclass of UITabBarController | |
//these next two are just basic ViewControllers | |
_futureTrackViewController = [[FutureTrackViewController alloc] initWithNibName:nil bundle:nil]; | |
_futureTrackViewController.delegate = self; | |
_futureTrackViewController.tabBarController = tabBarController; | |
_pastTrackViewController = [[PastTrackViewController alloc] initWithNibName:nil bundle:nil]; | |
_pastTrackViewController.delegate = self; |
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
//this method is in each of the two view controllers from the other gist | |
- (UITabBarItem *)tabBarItem { | |
UITabBarItem *tbItem = [[UITabBarItem alloc] initWithTitle:@"Future Tracks" image:nil tag:0]; | |
tbItem.titlePositionAdjustment = UIOffsetMake(0, -12); | |
return tbItem; | |
} |
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
[CatalyzeUser signUpWithUsernameInBackground:myUsername email:myEmail name:myName | |
password:myPassword inviteCode:myInviteCode success:^(CatalyzeUser *result) { | |
// ... | |
} failure:^(NSDictionary *result, int status, NSError *error) { | |
// ... | |
}]; |
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
Catalyze.getInstance(this).signUp(userName, password, firstName, lastName, userName, | |
inviteCode, new CatalyzeListener<CatalyzeUser>() { | |
@Override | |
public void onError(CatalyzeException response) { | |
// ... | |
} | |
@Override | |
public void onSuccess(CatalyzeUser response) { |
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
platform :ios, '7.0' | |
pod 'catalyze-ios-sdk', '~> 2.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
[Catalyze setApiKey:@"ios com.company.my.HealthTracker 8174bac4-1234-5678-9012-1234567890ab" | |
applicationId:@"98abcd64-0987-6543-21fe-abcdef192837"]; |
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
[Catalyze setApiKey:@"<type> <identifier> <id>" applicationId:@"<id>"]; |
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
#import "Catalyze.h" |
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
CatalyzeObject *entry = [CatalyzeObject objectWithClassName:@"surveys"]; | |
[entry setObject:[NSNumber numberWithInt:score] forKey:@"score"]; | |
[entry setObject:_lblQuestion1.text forKey:@"question_1"]; | |
[entry setObject:[NSNumber numberWithInteger:_segmentedQuestion1.selectedSegmentIndex] forKey:@"question_1_answer"]; | |
[entry setObject:_lblQuestion2.text forKey:@"question_2"]; | |
[entry setObject:[NSNumber numberWithInteger:_segmentedQuestion2.selectedSegmentIndex] forKey:@"question_2_answer"]; | |
[entry setObject:_lblQuestion3.text forKey:@"question_3"]; | |
[entry setObject:[NSNumber numberWithInteger:_segmentedQuestion3.selectedSegmentIndex] forKey:@"question_3_answer"]; |
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
int score; | |
if (indexPath.section == 0) { | |
score = [[[[_surveys objectAtIndex:indexPath.row] objectForKey:@"content"] objectForKey:@"score"] intValue]; | |
} else { | |
score = [[[[_otherSurveys objectAtIndex:indexPath.row] objectForKey:@"content"] objectForKey:@"score"] intValue]; | |
} | |
cell.textLabel.text = [NSString stringWithFormat:@"Score: %d%%", score]; |
OlderNewer