I've developed an app for iOS with Swift and now I'd like to add an ADBannerView in my tableviewcontroller just to show some iAd banners.
This is what I did :
I linked the iAd framework
In the ViewDidLoad of my tableviewcontroller I have added the following code :
self.canDisplayBannerAds = true
Quite easy! Perhaps too easy, because everything seemed to work fine, the view displayed the ad correctly but... performance was really bad!! My tableview scrolls smooth if I don't show the ad and keeps lagging while the ad is displayed... how come? What have I missed?
Thanks a lot
D.
thanks for your help, I was totally wrong, iAd wasn't the cause of slowness of my app.
I've found the problem (I was setting the font of a textbox inside the cellforrowatindexpath method).
I've upvoted your comments because they were the correct way to find the issue.
thanks again
All the best
D.
Related
I’ve put code in ViewWillAppear and I’ve tried ViewDidAppear but the app only updates when I close it and re-open it. Anyone have any idea on how to fix this? I’m using UserDefaults to update the app with. I’m new to swift and I’m using storyboard so could it have something to do with the hierarchy ? Any help on this would be really appreciated.
I am creating an app with a spinning wheel which updates with options put in a table view, ive added some pictures to help illustrate.
The table view updates fine but when I go back to the main screen nothing happens until I close the app and re-open it
I link my github in case you want to look at full code base.
https://github.com/jamesnjones/Just.Decide
ImageOfTable
ImageOfWheel
solved by including
spinningWheel.setNeedsDisplay()
spinningWheel.setNeedsLayout()
in view will appear
I'm trying to follow the tutorial on Apples Swift Tutorial
I've followed the UI layout but for some reason, when I hit play and the simulator pops up, my simulator shows up different than my preview. Any suggestions?
I feel this question may help somebody in the future so I won't bother deleting it.
Through my own stupidity I ended up building the UI under the LaunchScreen.storyboard ViewController instead of the Main.storyboard ViewController. Simple fix -> Put things where it belongs!
I'm updating my app form xib files to a storyboard. I'm also upgrading the app to iOS 7.
I have a two page app, like a Utility app. I can create e segue to flip to the second page. However when hitting the done button nothing happens. I've tried several things (the suggestions on SO too) but without result.
Ik started a new project (Utility) an compared the code for the segue and for dismissing the FlipsideViewController. In my project and the new one the code is the same.
I placed an NSLog call in the flipsideViewControllerDidFinish method but no effect.
I am out of ideas, please help.
While posting I got a (last) Idea. I had to check if the segue identifier was correct.
And it wasn't. So I corrected it and it works like a charm.
Thank you.
I'm trying to integrate iAd in iOS 7 app. According to Apple tutorial, one just have to use method:
self.canDisplayBannerAds
and iAd will work without a hitch. As I use it according to the tutorials, it gives a blank white screen. How to integrate iAds then? Do I have to use ADBannerViewDelegate so something else. Kindly explain
Im not sure about the simulator but if your testing on a device you need to do the following. Go into your settings select developer and select fill rate then 100%.
do you figure out mentioned issue?
I guess you need to implement the adbannerviewdelegate to handle load, unload, failed load scenarios. The blank white screen may be caused by network connectivity.
I have checked the solution all over stackoverflow and came across a couple of those to rectify the issue I am facing.
Below are the screen shots of the problem that i am facing while using collectionview in iOS7.
The application is toggling between these two views on every build process. Sometimes it displays the correct implementation and sometime is displays the incorrect one.
Gone through a lot of posts where extension of the custom layout with UICollectionViewFlowLayout was an option along with shouldInvalidateLayoutForBoundsChange and layoutAttributesForElementsInRect. But still the problem persists.
Does someone ran into similar kinda issue? Will be great if you guys can put some enlightment to this one.
I would suggest you try using something like DCIntrospect or simple logging to see what the frames are for your collection view cells and the collection as a whole.