开发者

Questions about recreating the "Add Alarm" form in the iOS Clock app

Questions about recreating the "Add Alarm" form in the iOS Clock app

(source: kominetz.com)

Hello. I'm diving into iOS development and am building my own alarm app to become familiar with the SDK. My questions are...

  1. I've played around with UITableViews a bit, but I don't understand how I would implement the table at the top half of this form. If I had to guess, I would say it's a single UITableView, defined with one section and four rows, is that right?
  2. If so, to implement it, would I just "hardcode" the cellForRowAtIndexPath function to create each cell manually?
  3. If not, is there an adopted approach to defining the layout and functionality of these types of settings pages?
  4. Row #3 has a switc开发者_运维问答h in it, is this a predefined cell style or a custom cell style that I have to define myself?
  5. Rows #1, 2, and 4 take the user to new views when they're touched. Is this a predefined style and or do I just implement the standard didSelectRowAtIndexPath functionality to push a new view onto the stack?

Thanks so much in advance for your help! I'm going to continue researching these questions right now.


In answer to your questions:

  1. Yes
  2. Yes
  3. n/a
  4. No, you have to add a UISwitch to the cell's contentView. Tip: Look at Apple's UICatalog sample code (controls sections) to see how to implement a tableview with different controls in different rows.
  5. Just use didSelectRow...


  1. For most apps, you want to implement the Application Preferences settings plist that will be used by the device's Settings application. It's typically a good idea to keep the settings for your app consistent with how the settings work in other apps.
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜