Bull's Eye

If you have the imagination and perseverance there is no limit to what you can make these cool little devices do.


pp16 start the first app Bull's Eye


Buttonpp27

Alert View popuppp28

ViewControllerspp29


These three files together-- the .xib, .h and .m -- form the implementation of a view controller. A lot of the work in building iOS apps is making view controllers.The job of a view controller is to manage a single screen from your app.

One of the design principles of iOS is that each screen in your app gets its own view controller. 

Simply put, the xib file contains the design of the view controller's user interface, while the .h and .m files contain its functionality. 


Making connectionspp30

The line of source code we have just added to BullsEyeViewControl.h lets Interface Builder know that the controller has a "showAlert" action, which presumably will show an alert view popup. We will now connect our button to that action. pp31


Files Owner

A xib, the user interface of a view controller,is owned by that view controller. This means the view controller will load that xib file, put all of its objects on the screen, and make the connections. The view controller will dispose of the xib file when the screen closes.  File's Owner, therefore, refers to the view controller object. 

Because actions are logic, not user interface, they are not defined in the xib file. In order for the button to hook up with showAlert, it must have a way to refer to the view controller's actions.

File's Owner is a convenient way to accomplish that. By dragging from the button to File's Owner, you tell Interface Builder that you want to connect the button to an action from the view controller.

If you're ever wondering who the File's Owner is for a xib, then select File's Owner and open the Identity Inspector. The Custom Class field will show you the owner's name. 


The outcomes of AlertView pp35







Create new window pp110

Close the about view window to the previous one pp121


pp125



import images files pp127


change the background  pp130


change the colour font of label. pp133


change the slider pp141    by code

Loads the local HTML file into the web view pp143


Retina displays   pp145 @2x.png



Icon pp148





Running the game on your device pp153    money - -!



















  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值