Objective-C Vitamins

0ebf471a3ae8df42a84f93a7efbbdbd0?s=47 Ash Furrow
January 22, 2013

Objective-C Vitamins

This is a talk that I gave at Tech Talks TO about the three things that the Objective-C community needs to embrace to grow into a mature, stable platform: Accessibility, Unit Testing, and Open Source.

0ebf471a3ae8df42a84f93a7efbbdbd0?s=128

Ash Furrow

January 22, 2013
Tweet

Transcript

  1. 11.
  2. 17.

    Part of UIKit Built in UIAccessibility Conformed to by UIView

    Built in You can roll your own Built in
  3. 18.

    UIAccessibilityTraits Causes Page Turn Starts Media Session None Button Link

    Search Field Image Plays Sound Keyboard Key Static Text Summary Element Not Enabled Updates Frequently Adjustable Allow Direct Interaction Header Selected
  4. 31.
  5. 33.
  6. 38.

    NSURLRequest *dummyURLRequest = [NSURLRequest requestWithURL:[NSURL URLWithString:@"http:// example.com"]]; PXRequest *requestUnderTest =

    [[PXRequest alloc] initWithURLRequest:dummyURLRequest completion:nil]; id mockConnection = [OCMockObject niceMockForClass:[NSURLConnection class]]; [[mockConnection expect] start]; id partialRequestMock = (PXRequest *)[OCMockObject partialMockForObject:requestUnderTest]; [[[partialRequestMock stub] andReturn:mockConnection] urlConnectionForURLRequest:OCMOCK_ANY]; [partialRequestMock start]; [mockConnection verify]; A Simple Test A lot of Code
  7. 39.
  8. 43.
  9. 44.

    describe(@"ClassName", ^{ context(@"a state the component is in", ^{ __block

    id variable = nil; it(@"should do something", ^{ [[variable should] meetSomeExpectation]; }); specify(^{ [variable shouldNotBeNil] }); }); });
  10. 45.

    describe(@"ClassName", ^{ context(@"a state the component is in", ^{ __block

    id variable = nil; beforeAll(^{ // Occurs once }); afterAll(^{ // Occurs once }); beforeEach(^{ // Occurs before each enclosed "it" variable = [MyClass instance]; }); afterEach(^{ // Occurs after each enclosed "it" }); }); });
  11. 46.

    VIOUR DRIVEN DEVELOPMENT BEHAVIOUR DRIVEN DEVELOPMENT R DRIVEN DEVELOPMENTBEHAVIOUR D

    BEHAVIOU BEHAVIOUR DRIVEN DEVEL BEHAVIOUR DRIVEN DEVELOPMENT VELOPMENT NT DEVELOPMENT NT BEHAVIOUR DRIVEN DEV UR DRIVEN DEVELOPMENTBEHAVIOUR BEHAVIOUR DRIVEN DEVELOPMENTBEH