Taking an iAd across multiple screens - iphone

I'm sure there's a simple answer to this but it's beginning to annoy me now!
I have an iAd integrated into my app which appears and works on the screen I've implemented it in. The app uses a NavigationController to move between multiple screens, but the iAd is only on one of them. After moving from start to finish through my app several times I get a message appear in GDB saying:
Too many active banners (11). Creation of new banners will be throttled.
The app then crashes.
I have tried looking through the Apple documentation and searched on Google and can't see a solution to the problem.
If anyone has any idea how I can resolve the issue it would definitely stop me from going mad! Thanks.

It sounds like you're not removing your iAds when views hide. I suggest doing the creation in viewWillAppeaer and removing ads in the viewDidDisappear method. Like this, you'l only end up with as many banners as you create in the visible view. It sounds like you're using the viewdidLoad/viewWillUnload pair instead.

Another alternative is to create the ADBannerView in a fixed location across all screens. It's a little bit harder than the above method, but it looks nice. For example, if you have a tab bar controller application, you can do the following in your app delegate:
[self.myTabBarController.view addSubview:self.myAdView];
It can get a little bit tricky to place other views underneath the ad.

Related

Problems with presenting views in Xcode

I hope you can help me with my actual problems with designing an iPhone-App in the latest xCode version.
Here´s what I find a bit strange:
I designed a new project with a Storyboard and a Navigation Controller. Then I placed Objects like UILabels, ImageViews and so on. No when I run the Project in the simulator (as well on the iPhone) I noticed the following: When the App loads all the in the View placed objects fall down from the top to take their defined place. It takes maybe the quarter of a second, but its clearly to see. It also happens on all other views initiated from the root view controller
So, what do I have to change that everything is at it´s fixed place without to fall down from the top at the start of the app?
I hope I described it good enough. Actually I have no idea what´s going on there. I hope you can help me to fix this "problem". I´ve written some small Apps before, but I´ve never noticed a behavior like this.
Got the solution: I´ve had to remove the animations on the main view... now it works proper! :-)

ios app second screen

I am a beginner to the iOS app development and working on a sample app that consists of just two "screens" - the first screen authenticates the user against user id and password saved in a SQLite database table and the second screen displays list of users in the database if user authentication is successful. If authentication fails I would just like an alert displaying appropriate message to the user.
I somehow can not connect how to "go to the second screen" if user authentication is successful. How can I tell the application that now that the user is authenticated it is time to go to the second screen and display the list of users?
I apologize if the terminology I use is not standard iOS app development terminology but I am new and would like to fill the gaps in my understanding. Please feel free to direct me to any links/tutorials/documentation.
Thank you.
Navigation is a fundamental and essential part of iOS programming and UX design. Traditionally, views are managed by ViewControllers, which in turn may be managed by NavigationControllers in stacks. To naivgate between and away from controllers, we define two new verbs: Push and Pop. To go to a new view, one pushes it onto the navigation stack. To transition away from a view, one pops it off the stack. And so, with these two paradigms, we can define simple transitions which are managed by the UINavigationController object. Have a look at the navigation guide in the docs before you proceed any further.
You don't appear to have sufficient understanding of iOS basics for any of our answers to be helpful. A word of advice: don't waste your time wrestling with code before you have a bit more of a foundation; you will just become frustrated.
Take a few hours and review some of the videos in Paul Haggarty's Standford iOS course.
Once you understand some of the building blocks and concepts of the API, things will move along much more quickly.
Are you developing against iOS with Storyboards?
If you start with the boilerplate "Master/Detail" template in Xcode for iOS 5 with Storyboards, you will get some sample code for a master view (uses a UITableView), detail view (uses a UIView with a label in it), and a segue between the two view controllers to go from master to detail, along with a "Back" navigation button that pops the detail view off and back to the master view.
The iPad boilerplate for that type of project is slightly different in the it uses a UISplitViewController to show both master and detail at the same time and doesn't use a segue between the two.
You could take a look at that boilerplate code, modify it, and go from there.

Is iAd Suite (tabbed banner) buggy?

After implementing iAds in my app using the Apple example of the tabbed banner. I noticed that I am getting the "banner has an add but may be obscured warning". So because of my relative noobish status i tried to find my mistake. After much searching I couldn't find an answer, and in desperation, i ran the Apple sample code on its own in the simulator, and it too gives the "banner may be obscured warning". Am I missing something. Is this a bug?
I think iAd gives you the "may be obscured" warning if the iAd is not the frontmost view in the current view hierarchy. I haven't thoroughly tested this assertion though.
If you are using Interface Builder you can bring the iAd to the front by moving it lower down on the list of objects on your view controller. In code you would add the Banner Ad last.
Edit: nix this theory - the message reappeared.
Means banner has a part which is not fully or partly visible.
Search google or stackoverflow there is plenty answers on this question

iPhone, how can I provide a simple tutorial for my app where screens are pushed etc?

I'm looking for a simple way to provide a tutorial for my app.
I want the tutorial to show something on screen and be moved to the next screen as they move through the tutorial.
Any ideas?
Use an NSTimer in your AppDelegate to automatically present views over a period of time, in sync with a voiceover

iphone application layout

I'm trying to get started with an iPhone application, I had a look around at other questions but i'm still sorta stuck so hopefully someone can help...
First thing is I'm totally confused with the whole view concept, I'm more used to visual studio so I'm going to use the term 'form' to describe what I have in my head.
I want to achieve a home screen in an application with say 9 icons (much like the iphone home screen) which each lead to a different 'form'. Each form may have a different function so say one might be a simple calculator, one might play a video etc.
How do I do this, its destroying my soul trying to do something so simple... If you guys even have any links to get me on the right track it would be greatly appreciated
I suggest you take a look at the Stanford iPhone Programming Course. If you don't have the time to look through it all, I reccommend at least Lectures 5 and 6 about Views and ViewControllers. The slides are quite instructive and they come with video presentations that should help you get on your way in about an hour.
Apple's samples are a great place to start. There are some simple ones that can show you how views and view controllers work.
Also, in Xcode, when you create a new iPhone app template, that template usually has enough code to display a view, and sometimes a flip-side view or more. Sometimes, you should stop reading, and do.
I had the same weird learning curve as you, as things don't initially seem to make sense but they do - and once you've got your head round them they make perfect sense trust me!
Your 'forms' are viewControllers in this M-V-C land, they control all the 'view' (which are controls or any object which can be seen) within them. Normally they are loaded from a Nib (design from the interface builder), but don't have to be.
The way I would go about your problem is to use a navigationController as the base to handle all of your view controllers.
A navigation controller needs a rootviewcontroller to start so this will be your desktop Viewcontroller. I'm not sure how you are planning to populate this but all the icons will need to be stored in some kind of array. I suggest you use a simple UIButton. When then button is pressed you then alloc and init and push the required view controller.