Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum

View Single Post
Old 10-23-2009, 10:15 AM   #18 (permalink)
jazztpt
Registered Member
 
Join Date: Jun 2009
Posts: 32
jazztpt is on a distinguished road
Default

colionel: I'm intrigued by your use of a service. I haven't seen this before, so I'm imagining how this would work. In the Apple sample code I've seen, the UIViewController subclasses access Core Data directly...I assume that each UIViewController subclass would import the service, then use it each time it wanted to read/write data.

If this is the basic paradigm, why couldn't a widget controller also access the service?

Quote:
Originally Posted by colionel View Post
But why not simply have a skin property in your controller ? that's the normal way to do this.. in your viewDidLoad you set your skin to your view.. No need to subclass UIView.
As I said, these widget controller objects should be NSObjects with a view property and subviews, mirroring the UIViewController paradigm.

Quote:
Originally Posted by colionel View Post
Imagine that the UITextField widget was reading and writing from core data. When you want to use it you need to edit the framework. That would be a nightmare. Your widget must not decide how your system is built, it's your system which decides how to use a widget...
I'm not building framework-reusable widgets, I'm building single-app reusable widgets. I have n screens, each of which is dynamically populated with any number of five types of widgets. Since the widgets function identically and are populated dynamically, I think reuse is served when they are separate objects.

Is there a reason not to have them access the service?
jazztpt is offline   Reply With Quote
 

» Advertisements
» Online Users: 526
19 members and 507 guests
Apptronics RBC, chiataytuday, daunmi, DaveDee, Duncan C, HemiMG, ilmman, jmorregoc, LEARN2MAKE, Libera, mariano_donati, mediaspree, mox, newprogrammer, oceanlablight, Simba, Speed, tommiss12
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,318
Threads: 93,990
Posts: 402,422
Top Poster: BrianSlick (7,978)
Welcome to our newest member, Libera
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 09:14 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.