开发者

How would you store the data that represents the current list of Alarms in the iPhone Clock app?

开发者 https://www.devze.com 2023-01-10 04:32 出处:网络
(source: epicself.com) I\'m diving into iOS development and I have a few questions about the iPhone Clock app.

How would you store the data that represents the current list of Alarms in the iPhone Clock app?

(source: epicself.com)

I'm diving into iOS development and I have a few questions about the iPhone Clock app.

  1. Whe开发者_运维技巧n the user adds a new Alarm, what's the best way to store it? Using a simple plist? Using Core Data?
  2. If you look at the Alarm tab in the Clock app, you'll notice it only shows one table cell for each Alarm that exists. How can I achieve this same appearance? The default table view fills the whole screen with empty table cells, which I think is ugly.

Thanks in advance for all your help!


  1. For such a small data set, saving to a plist would be OK. Core Data would certainly be a little OTT as the dataset would probably so small?

  2. There is no easy way to do this, but it is certainly possible. The way this is achieved is as follows:

    1. Place a background image behind the table view.
    2. Generate a gradient which looks like a drop-down shadow.

You'll be best off reading the following posts:

  • http://cocoawithlove.com/2009/04/easy-custom-uitableview-drawing.html (Using Images)
  • http://cocoawithlove.com/2009/08/adding-shadow-effects-to-uitableview.html (Using Code)
  • http://tumbljack.com/post/188089679/gpu-accelerated-awesomeness-with-cagradientlayer (Using Code, ties in to the link above)
0

精彩评论

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