Created
October 31, 2013 06:00
-
-
Save okitsutakatomo/7244910 to your computer and use it in GitHub Desktop.
SkyLabを利用したiOSアプリケーションのABテスト ref: http://qiita.com/okitsutakatomo/items/90a96a4ef2276251cd56
This file contains hidden or 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
[SkyLab abTestWithName:@"Title" A:^{ | |
self.titleLabel.text = NSLocalizedString(@"Hello, World!", nil); | |
} B:^{ | |
self.titleLabel.text = NSLocalizedString(@"Greetings, Planet!", nil); | |
}]; |
This file contains hidden or 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
[SkyLab splitTestWithName:@"Subtitle" choices:@{ | |
@"Red" : @(0.15), | |
@"Green" : @(0.10), | |
@"Blue" : @(0.50), | |
@"Purple" : @(0.25) | |
} block:^(id choice) { | |
self.subtitleLabel.text = NSLocalizedString(@"Please Enjoy This Colorful Message", nil); | |
if ([choice isEqualToString:@"Red"]) { | |
self.subtitleLabel.textColor = [UIColor redColor]; | |
} else if ([choice isEqualToString:@"Green"]) { | |
self.subtitleLabel.textColor = [UIColor greenColor]; | |
} else if ([choice isEqualToString:@"Blue"]) { | |
self.subtitleLabel.textColor = [UIColor blueColor]; | |
} else if ([choice isEqualToString:@"Purple"]) { | |
self.subtitleLabel.textColor = [UIColor purpleColor]; | |
} | |
}]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment