2012/2/24

UIView Touch,觸控事件處理

UIResponser有四個對觸控碰處理的method(interface)介面
UIView與UIViewController 都繼承至UIResponser
因此只要是UIView與UIViewController的子類,實作以下四個method就能對觸控做處理

touchesBegan:withEvent:,
touchesMoved:withEvent:,
touchesEnded:withEvent:,
touchesCancelled:withEvent:

2012/2/8

iOS程式初始化流程

  1. main()
  2. create pool
  3. UIApplicationMain(argc,argv,nul,@"delegateClassName");
  4. Create UIApplication instance and set the UIApplicationDelegate