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

Objective-C Introduction part2

Objective-C Introduction part2

Tweet

More Decks by Juan Pablo Ortiz Aréchiga

Other Decks in Programming

Transcript

  1. Blocks • Typed argument list just like a function •

    Can capture state from the lexical scope within which it is defined • Can optionally modify the state of the lexical scope • Can share the potential for modification with other blocks defined within the same viernes 23 de marzo de 12
  2. Views • Represent a rectangular area • Draws and handles

    events • Hierarchical • Ordered as they’re added viernes 23 de marzo de 12
  3. Views Frame • Rectangle • CGPoint = {0.0f, 0.0f} •

    CGSize = {100.0f, 100.0f} • CGRect = {0.0f, 0.0f, 100.0f, 100.0f} viernes 23 de marzo de 12
  4. Views transparency • Can do, but is expensive (composites) •

    Opaque is your friend viernes 23 de marzo de 12
  5. Views memory management • A parent retains it’s subviews •

    Released when removeFromSuperView viernes 23 de marzo de 12
  6. View Controllers • View based applications.. so most of them

    • Could use a nib, but not required viernes 23 de marzo de 12
  7. UIGestureRecognizer • Touches! • 1. Assign gesture recognizer to a

    view. • 2. Handle event for gesture • 3. Profit viernes 23 de marzo de 12