HI all.
In my iPhone App, am adding a subView(button , image view etc) to the view of a viewController in its loadView method...
But the program is going in a infinite-loop...
Problem is that it will call loadView for the first time, and when it reaches the line where i add button
[self.view addSubView:button];
it is again calling the method loadView.
So my question is what all i can do in
loadView ???
Is it okay to add all those subViews "init" and leave "loadView" as blank ??
If i want to change add/remove subviews dynamically, i cant do all stuffs in "init" right?
Adding to above questions.. i found in most of sample apps, control is not coming to "dealloc" in its classes (espclly viewControllers classes)...
So what happen to the Occupied views and subviews in memory?
In my iPhone App, am adding a subView(button , image view etc) to the view of a viewController in its loadView method...
But the program is going in a infinite-loop...
Problem is that it will call loadView for the first time, and when it reaches the line where i add button
[self.view addSubView:button];
it is again calling the method loadView.
So my question is what all i can do in
loadView ???
Is it okay to add all those subViews "init" and leave "loadView" as blank ??
If i want to change add/remove subviews dynamically, i cant do all stuffs in "init" right?
Adding to above questions.. i found in most of sample apps, control is not coming to "dealloc" in its classes (espclly viewControllers classes)...
So what happen to the Occupied views and subviews in memory?