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
// Example of a better API for UIActionSheet | |
- (void)showActionSheet { | |
ECActionSheet *actionSheet = [[ECActionSheet alloc] initWithTitle:@"Title" cancelButtonTitle:@"Cancel"]; | |
// set a destructive button if needed | |
[actionSheet addDestructiveButtonWithTitle:@"Destructive Button" target:self action:@selector(destructiveButtonPressed)]; | |
// add buttons with target/action | |
[actionSheet addButtonWithTitle:@"Button One" target:self action:@selector(buttonOnePressed)]; |
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
Factory.define :post do |post_factory| | |
post_factory.user { Factory.build(:user) } | |
end |