tags:

views:

27

answers:

1

I have different view controllers and i linked them using insertsubview
There are atleast three levels of subviews for every screen the users sees.
I havent tested it on device yet.
I want to know whether this causes any performance issues
Also, is using NavigationBarController pop and push views better than addsubview and remove from super view.
(I dont want the back functionality of NavigationBarController and want a custom header. That is why i didnt use NavigationBarController)

A: 

This is an interesting statement :

I haven't tested it on device yet.

My advice is simple :

Test it on a device.

Only you know what your app does - you can't possibly think we can answer your question with so little information! 3 doesn't seem a very big number but I don't know what each of those views is doing so maybe it's an issue, maybe not.

deanWombourne
Thanks for the response. I agree with you. what I am really looking at is if adding subviews is a bad practice. (I am very new to iphone dev). I want to know if its Something like evil eval in javascript
Rajani Karuturi
It's not particularly bad practice but it really is one of those things that depends on what those subviews are doing. I'd read up on UIViewContentMode any how a UIView is dawn. Basically, I'd try to avoid unneeded ones but given that every UI component you use is a subview you shouldn't be too worried.
deanWombourne