I'm diving into iOS development and I have a few questions about the iPhone Clock app.
- Whe开发者_运维技巧n the user adds a new Alarm, what's the best way to store it? Using a simple plist? Using Core Data?
- 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!
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?
There is no easy way to do this, but it is certainly possible. The way this is achieved is as follows:
- Place a background image behind the table view.
- 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)
精彩评论