Facebook sdk login appears whenever UITable is used - objective-c

I have implemented Facebook into my app but now I find that whenever I try using a UITableView elsewhere, the Facebook Login screen appears in the view instead and it is covering up the table that should be there. It is like the login screen functionality is in the background (I cannot interact with the login screen) but it is displayed in the foreground?
I implemented everything as the tutorial on fb shows... Including what is needed in the app delegate. If anyone knows what code I need to modify within the Facebook sdk it would be much appreciated!
Thanks
P.S. If you would like the code... I can post its just there is a quite a bit of it

Make the UITableWhite and it seems to cover up the Facebook

Related

How to implement a Facebook like button without leaving iOS app?

I was wondering how can I implement a Facebook "Like" and "Unlike" button right within my app without making the user leave the app. I know Apple has implemented this in their App Store app, so it is clearly possible. Here are some screenshots:
Notice how you can press the like and unlike buttons and you remain in the App Store application. I would like to link these like buttons to my Facebook page.

UIWebView crashes when touching any inputs for logging details

I added a simple in-app UIWebView feature. I noticed that when ever I touch an input box to enter login details (facebook login,twitter login, forums login,etc) the application crashes. I have tried on more than one device. I even created a new project to test it out and the app still crashes.
Is there some restrictions on UIWebView from Apple ?
Note: I would post the UIWebView code but it's simple and popular and I'm posting my Q from my iPhone. Will post any if you ask.

iOS: Restoring the previously visible view when the app returns to the foreground?

I'm developing an iPhone (iOS 5+) app using storyboards. The first screen of the app is a splash/login screen that checks for Facebook credentials and enables you to read and accept Terms And Conditions. In case there are valid stored credentials and the TOC has been previously accepted, this view automatically makes a modal segue (using a cross dissolve effect) to the first "real" application view, a tab bar controller with three tabs.
I'm currently implementing backgrounding and foregrounding logic. The problem is that when pressing the home button and then coming back, the login screen is briefly shown before the correct pre-backgrounding view is restored. (The Default.png of the app is of the login screen background, so it might be either that or a backgrounding-time screenshot of the actual login screen; I haven't tested replacing Default.png yet to tell the difference.)
Why is this? As far as I can tell, backgrounding the app should just take a screenshot of the view that is visible on the screen when, say, hitting the home button, and restore that prior to restoring the actual view functionality when coming back to the foreground. In this case that would be one of the tabs of the tab bar controller. Is the modal segue between the login screen and the tab bar controller the culprit here, or something else?
(I've always felt that the cross dissolve modal segue from the login screen to the first "useful" screen is a bit dirty, since IMHO a modal segue seems to imply that what your segueing to is something you'll later dismiss to get back to the "from" screen. What I'm doing now is just leaving the target of the modal segue visible indefinitely. If that is the problem here, I'd love it if someone would suggest a better method of displaying, transitioning away from and "jettisoning" the login screen.)
OK, turns out this was just a simulator/device discrepancy regarding Default.png. This comment on another question made me think to check. Time to file a bug report.
If I recall correctly, Apple has some old demo code which "remembers" which view a navigation controller was showing before it went into the background.
By way of disclaimer, I haven't worked with storyboards, so I don't know the specifics of doing what you're trying to do.
If it were me, I'd create the view controller or controllers at launch, and then only add the login screen if deemed necessary by the app delegate's logic. Only then, after setting up the view hierarchy, do I present everything.
This accomplishes two things. My login screen only exists and is visible if necessary. Additionally, the login screen won't flash unessecarily. Oh, and as a third benefit, you can present any view you like.
I'd suggest, assuming the aforementioned demo code doesn't work for you, that you'll want to save some sort of reference, tag, or ID of the currently visible view in NSUserDefaults and read that out when setting up your view hierarchy on launch.

UIWebView: how to hide part of the content of a webpage?

In my app I have a webview that is used solely for displaying the facebook page.
However, the client does not want the top blue bar of facebook to appear; he wants to hide it.
Is there a way to do this?
The bar is 45 pixels, so what I did is I moved the UIWebView in IB in such a way that its top 45 pixels are behind my navigation bar (thus not appearing).
However, this is not an ideal solution, as the user can see that content when he scrolls up, before bouncing. He can see but not touch it, which will be frustrating for some users.
I tried turning the bouncing off, but then the UI becomes too rigid, and not fluid.
I looked up in Google and Stackoverflow for a couple of hours but didn`t find a solution.
Thanks a lot!
You'll have to edit the HTML/CSS of the page itself to hide the HTML elements in question, probably using regular expressions, and feed it into your UIWebView with loadHTMLString:baseURL:.
I've done similar manipulating before and it works, but... it's a different ballgame when the webpages in question don't belong to you. Any time Facebook updates their layout, your app behavior might change until you have time to get an app update approved. Clients want what they want, but make sure your client knows what he's asking for!
First test out the javascript code used to hide whatever elements in the webpage and then pass up to stringByEvaluatingJavaScriptFromString of UIWebView to run it.

Clickable ad banner on loading screen is ios app

I want to add clickable ad banned on launch screen of my app, how can I do that? Help me, please. Thank you
Please note that the default splash screen is just an image so if you want to add an ad to the launch screen you will need to make custom view that changes after some time. Here is a good tutorial for adding iAd integration to iPhone application.