Using a view within a view causes crashes?

I am a learning developer that is always trying to learn new things. I am playing around with more advanced views and subviews, and am currently trying to use a view within a view. I know how to use modal views, but in this case I want both views to be present and running. So, picture the iPad running an unscaled iPhone app, that is basically the same idea of what I am trying to do. I can get the view to load up just fine, however, when I use buttons or anything inside the views that the user interacts with, the application crashes. It gives the following error message: EXC_BAD_ACCESS (Code=2, Address=0x17). What's weird is that there is no output from the debugger on this issue. I have tried to use a delegate (the way you do in a modal view) and it doesn't change anything. Any help is much appreciated :)

Answers


You can, of course, put many views inside a view.

EXC_BAD_ACCESS means you, or some object, is trying to access an object which has been deallocated.

I can mostly promise you that the issue is not because you are putting a view in a view, that statement and actually doing that is fine.

How you go about doing it, and how you handle everything is a different story.

You didn't provide any code or context as to where and how you are adding a view to a view, which is probably where the issue is arising. Enabling NSZombie as suggested by xlc0212 is a great idea to help diagnose the problem.

Hope this helps


Need Your Help

How to use salt and hash in login?

php codeigniter hash salt

I want to use salt and hash to create security login. I try to follow this tutorial and write own code but it always return false. Here is my code:

Automatic Cookie Handling C#/.NET HttpWebRequest+HttpWebResponse

c# .net cookies

Is there any way to automatically handle cookies in .NET with the HttpWebRequest/HttpWebResponse objects? I'm preferably looking for an equivalent to LWP::UserAgent and its behaviour (perl), only i...