Now you can react however you see fit: open a URL in Safari, open the Facebook App, etc.
Another thing of note: since the button will be pulled in from Facebook.com, it will not be displayed when a user is not online. Check via UIWebViewDelegate and if the URL can’t be loaded present an image from your bundle instead.
Table View headers or footers can’t be tapped. Sometimes however that’s exactly what we want to do.
In this example we’ll add a new UIView to out table view and add it to the table’s footer. Inside this view we’ll have a custom button which we’ll create with an image. We’ll also have a method that is called when the user presses the button:
We can do this by setting properties of the UIButton for the states “normal” and “highlighted”. First we create pointers to the images, then we tell the button to use said images for each state: Continue reading →