Simultaneous iAD's results in only one getting served - objective-c

I seem to have a peculiar problem, which is as follows. I have two views in an iOS app 1) TableViewController View as a table and a click on a particular row of the table would land me in new UIView. I am using iAd to serve banner ads on those two views.
Now the problem is : iAd is not serving ads on the second view after it had served on the landing table view. But if I disable the ads on the first view i.e table view controller I can see the ads being served on the second page i.e UIview.
I have also checked these against admob and found that above doesn't seem to happen with them.
Any help is appreciated !

Related

How to create a master view for an iPad app

What I'm looking to do is create some kind of master view, that would have the same header (with a logo), footer (with some text and a button), background image and navigation (not a navigation bar, just a few buttons) on every view.
You could think of what I'm after doing is like a PowerPoint presentation. Create a master slide that's layout is used through every slide, you create a new slide and it takes across all the masters properties (header, footer, background etc) and then it's just the content that changes on each new slide.
However, I'm not too sure how I would do this in an iOS application. I've had a look on Google searching many different phrases but all seem to be about iPad split views and using cells of a tableview, which isn't what I'm after.
All I can think to do is create a single view controller class, with a view, and then add a sub UIView for each page I want (about 15-20), but with the one class, and every page having different content and a lot of code required for each one, that's going to get messy! Or I simply recreate the footer and header etc on every view controller, so if there were to be a change, then I'd have 20 views (more if it grows) to edit! So I'm just wondering if there's a simple way of getting what I'm after.
The app will be for iPad only, and I can use any OS up to 5, so xibs or storyboards are fine. And this won't be on the app store if that helps.
I've done a quick drawing below. The master view with all my bits to be used on each page, and then content slides that will slot in and out of the mater's content area.
Check out Containment View Controllers. This kind of presentation is exactly what they are designed to handle. There is a really nice WWDC presentation from 2012 I believe that illustrates how these work. There are also several tutorials online if you search.
maybe the best option is to create a master detail page. Then for each new page, call the master?
If u want to show header and footer view in whole apps then add header and footer view in window not in view controller i think it will work

UIPageControl lagging on retina devices

I've implemented an iphone app with a page controller following Apple's code example. There are only 3 views on the page controller. The app works fine on normal screens, but when I test it on retina devices, there is a visible lag when scrolling either horizontally or vertically in any of the views. Any ideas of what the problem might be or how can I "debug" this?
The content of 2 of the views is a table view and on the third view I'm using CorePlot. The network is not used while scrolling.
The amount of data loaded and drawn during the scroll makes your device choking. Try to load those views in other thread using gcd and blocks.
I was adding a shadow around the 3 views and that's what was making the scrolling slow.

Controls/Design Pattern to use for an iPad app with two levels of tables leading to a detail view

I have an e-commerce site I'm trying to produce an iPap specific app for and am struggling with the best way to recreate the menu structure. We have a top level menu that lists product categories. Clicking on that displays the list of products in the selected category. Clicking on the product takes you to the product detail page.
It seems like a great place for a UISplitViewController but I'm struggling with the two levels of browsing. Should I do a single table controller for the product categories taking you to a UISplitViewController with the product list and product detail? Or just two separate tableviews leading to a normal view and not mess with the splitview? How have other app handled this? I'm honestly not that much of an iPad user, so I'm not familiar with how other apps have done this type of thing.
If you are prepared to only target iOS 6+ you could wait and use the UICollectionView. Then you could implement something similar to the photos app on the iPad with pinching/zooming and turning of products (instead of photos). The WWDC 2012 videos have examples to view and go through example code.
If you have to target iOS 4+, UISplitView will also do the job in a more straightforward fashion.
The design with the UISplitViewController is what you should go for. You can then deal with your hierarchy incode more or less like you would on an iPhone with a plain navigation controller.

Core Data with UISplitViewController best practice and Prev/Next Button?

I need to display the following data structure in Core Data on iPad:
Categories(tableView) -> Products(tableView) (This part with 2 layers of navigation controllers in masterView on the left side of UISplitViewController)
With a particular product selected, display ProductDetail in the detailView on the right side of UISplitViewController.
The challenge is to add Prev/Next buttons in the detailView and navigate through different products within that particular category. Including functions where in portrait mode:
1.when masterView disappears, the Prev/Next are still able to function properly.
2.Say if user currently is at Category1->ProductList1, user navigate back from ProductList1->Categories, did not select any other category, dismisses materViewPopOver. After using Prev/Next to navigate between products in ProductList1, then reopen the masterViewPopOver, original ProductList1 is shown in masterViewPopOver (instead of at Categories level when last dismissed)
Bottom line is, I want it to function exactly like the native iPad Mail app.
Can any one advice what is the bet practice to achieve this behavior?
Should I use only one FetchedResultsController (with many sections) to handle both Categories level and Products level data? Or should I use two (one for each level)? How do I make sure detailView keeps track of the Prev/Next order?
Any input is appreciated! Thanks in advance.

Using UIImagePickerController on the iPad

I'm developing an iPad app for use in-house. It's basically a SplitView based app, with a list of items. The details view contains a navigation controller. When the user selects an item in the rootview, it displays the definition of that item in the details view.
I want them to be able to drill-down into a gallery of images for that item, and be presented with a UI similar to the iPad photos app. Basically thumbnails with the ability to view it at original size and then go back to the thumbnails.
I was looking at using the UIImagePickerController but it looks like you need to use that in a Popover control, is that the case? It also looks like you can also only use it with pictures stored in the photo area on the iPad.
The images I use are downloaded to the iPad at startup, if it makes the whole thing do-able, can I save them into the users photo's area? As an album for each item?
Failing all of that, is there a nice clean, simple solution that would meet my requirements? I've tried using the Three20 solution but couldn't get it to work with my SplitView. Can the OOTB UIImagePickerController do what I need?
Three20 right now is not iPad ready, for your requirement, you can fine-tune Three20 and use it to display the original size images, and then pop-back to view controller which shows the thumbnail images.
I suggest using Three20 in a modal view controller with a pagesheet or formsheet preeentation style.