Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Objective-C Vitamins

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.

Ash Furrow

January 22, 2013
Tweet

More Decks by Ash Furrow

Other Decks in Technology

Transcript

  1. Part of UIKit Built in UIAccessibility Conformed to by UIView

    Built in You can roll your own Built in
  2. 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
  3. 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
  4. describe(@"ClassName", ^{ context(@"a state the component is in", ^{ __block

    id variable = nil; it(@"should do something", ^{ [[variable should] meetSomeExpectation]; }); specify(^{ [variable shouldNotBeNil] }); }); });
  5. 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" }); }); });
  6. 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