Note that there are some explanatory texts on larger screens.

plurals
  1. POModel View Controller (MVC) - Real-world implementation help
    primarykey
    data
    text
    <p>In a couple of weeks, working on and off, I've managed to create the app that I had envisaged. It has the functions I want, and the performance is not too bad. However, if I look at my code it clearly has been put together without proper MVC consideration, and I know it's gonna bite me in the butt if I try scale the app or reuse stuff for other apps.</p> <p>The assistance I would appreciate is to help me understand where each of the bits of my app code <strong>should</strong> be placed.</p> <p>Here are the files I've got:<br> 1. App delegate - NSObject (Assume Model?)<br> 2. View Controller - UIViewController (Assume Controller?)<br> 3. View - UIView (Assume View?) </p> <p>Here are the kinds of things I've implemented:<br> 1. Set initial values for instance variables.<br> 2. Target-Action (IBOutlet, IBAction) (e.g. Button pressed to call a Method)<br> 3. Load an image from Photo Album into UIImage<br> 4. Save a UIImage into Photo Album (i.e. UIImageWriteToSavedPhotosAlbum)<br> 5. Method to determine the maximum image res for the hardware it's running on.<br> 6. Drawing gradients (e.g. CGContextDrawLinearGradient)<br> 7. Resizing of images.<br> 8. Display the image (e.g. drawInRect)<br> 9. Deal with memory warnings.<br> 10. Method to toggle UI controls visibility<br> 11. Threaded methods </p> <p>Most the the above is within my View which I imagine is completely wrong. Please help me map the 11 items list above to which file or MVC they should be placed in.</p> <p>Thanks!</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload