0

I have three childViewController views inside my ContainerViewController and these three views are inside a horizontal scroll view. My intention is to build an app that has a custom camera on one ChildViewController view, a tableView which will display JSON data on another view, and a page which will show a list of the users friends.

The reason I am building it this way is to achieve a dragging/sliding effect between the three different child views. Although I get the result I want from a UI/UX perspective, i'm not sure how this will effect memory and performance. If i'm not mistaken my containerViewController will be handling a lot of activity.

Would there be an alternative way to architect this type of application? I understand I could have three separate view controllers using a Navigation Controller but than I wouldn't achieve the UI/UX experience I want. I'm really after the dragging/sliding between different pages experience, similar if not the same as Snapchat/Tinder

0

There's no real way to know based on the description you gave. And I know that's sort of a vague answer, but it depends on a whole bunch of other things. Are you using the standard UIImagePickerController to take photos, or rolling your own using AVFoundation? If you're rolling your own, you could be leaking or misusing memory such that your UIViewController architecture doesn't matter. Are you fetching your JSON data synchronously or asynchronously? How are you fetching the user's friends? Are you showing their profile pictures, if applicable? How are you fetching those? You could have slow HTTP requests or slow CoreData queries that are entirely separate from your front end architecture.

The other consideration is which device and minimum version of iOS are you using? An iPhone 4 obviously has much higher memory constraints than an iPhone 5S (or an iPhone 6 PLUS!).

At the end of the day, this is what Instruments is for. Build your application the way you want it to be, and profile it. If there are memory or performance issues, Instruments will identify them and you can look into them.

  • Great answer man, great answer! I am rolling using my AVFoundation. The JSON data I will most likely load in the background such as a profile picture because I don't want my UI to slow down. Your for sure right about the device version as well. I believe I will target iPhone 5 and up. Considering the new iPhone 6 is coming out, iPhone 4 users should step up their game! I'll take your advice and build it the way I want and profile for performance issues as I go. Thanks a lot @jmstone – Vlad Bahtjak Sep 11 '14 at 19:55
  • If this answers your question, please mark it as such so others with the same question can learn from your experience! – jmstone Sep 12 '14 at 4:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.