Skip to content

Instantly share code, notes, and snippets.

@okitsutakatomo
Created October 31, 2013 06:00
Show Gist options
  • Save okitsutakatomo/7244910 to your computer and use it in GitHub Desktop.
Save okitsutakatomo/7244910 to your computer and use it in GitHub Desktop.
SkyLabを利用したiOSアプリケーションのABテスト ref: http://qiita.com/okitsutakatomo/items/90a96a4ef2276251cd56
[SkyLab abTestWithName:@"Title" A:^{
self.titleLabel.text = NSLocalizedString(@"Hello, World!", nil);
} B:^{
self.titleLabel.text = NSLocalizedString(@"Greetings, Planet!", nil);
}];
[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