Skip to content

Instantly share code, notes, and snippets.

@prabirshrestha
prabirshrestha / TextFieldChanges.m
Created August 2, 2012 13:53
Reactive Cocoa examples
@synthesize firstName = _firstName;
@synthesize txtFirstName = _txtFirstName;
[RACAbleSelf(self.firstName) subscribeNext:^(id x) { [self firstNameChanged:x]; }];
[self rac_bind:RAC_KEYPATH_SELF(self.firstName) to:self.txtFirstName.rac_textSubscribable];
- (void) firstNameChanged:(id)firstName {
NSLog(@"changed: %@", firstName);
}
@jmoody
jmoody / navbar_steps.rb
Created July 27, 2012 19:49
calabash-cucumber steps for dealing with the navigation bar
def navbar_visible?
!query('navigationBar').empty?
end
def navbar_has_back_button?
!query("navigationItemButtonView").empty?
end
def navbar_should_have_back_button
unless navbar_has_back_button?