UIWebView and Gesture Detection - iphone

HI There,
I have a View Base Project application and one of the viewcotrollers simply manages a view that houses a UIWebView. I need to be able to detect tapping events on the UIWebView. I've tried suggestion here but cannot get it to work. http://mithin.in/2009/08/26/detecting-taps-and-events-on-uiwebview-the-right-way/
Would anyone have a sample viewbased application that implements this method. I think Id be able to then use this sample to implement in my own project properly.
Really stuck and wouldn't be asking only I've tried now for 2 days solid to get it to work.
Many thanks for your help on this.
Tony

I sorted it. Should have read article properly. I forgot to Make sure in your MainWindow.xib file, the window is of type TapDetectingWindow and not UIWindow.
Sorry about that.
Tony

Related

In-app tutorial

Im looking at adding a tutorial kind of thing to my app. Basically I want to be able to give a quick message across of what the parts in the app do. I want the users to see it once and not again. I have searched relentlessly for this but I always found app building tutorials.
A lot of games have what I want but I cannot for the life of me find how to do it or, what it is called to find a tutorial. Could someone please help me out.
Thanks in advance,
Sam
You'll need to build it yourself.
What I usually do is, on top of the view i want to explain, add a semi transparent view with some arrows pointing at stuff and a small text/button explaining it. All of that has to be modal and you can save in the NSUserDefaults if the user has already seen it/skipped it/launched the app for the first time. You'd have a method that builds all those views and you simply call it in viewDidLoad (by checking against a simple boolean value store in those previously mentioned NSUserDefaults, for example)

How to create tabs dynamically in Objective C

I am trying to implement the following kind of tabs into my Application. I have first tried it with creating buttons. So can anyone guide me how to create this kind of interface ?
I want to clarify that this are the groups & it will be dynamically created & it can be in any number.
Any suggestions & references will be highly appreciated.
Thanks in advance.
I've been implementing pretty much exactly what you are asking in an app im working on, i've uploaded the source files here. its pretty much plug-and-play, just make a TabView where you want your tabs and hook up the delegate methods. can swap out all the images with your own (my tabs were underneath something and not on top so they will look upside down initially for you).
Dont really have time to explain the inner workings of it all, but if you play around with the code im sure you will manage to customise it how you want. otherwise, just learn from it and implement your own.
edit: oh and there is some code that changes how the tabs look depending if iOS 7 or not, you will get an error when first importing it because i have a variable in my appDelegate isIOS7 which you can either implement in your app, or just take out all the relevant iOS 7 checks in the code

Attach a webView instance variable to a Web View object

Im trying to follow this tutorial
The tutorial is a bit out dated because NIB files dont get used anymore like this with the xCode storyboards. So my question is how do I attach the webView instance variable to the Web View object? This is probably a really basic question hence im new to this.
Thanks
Oke i found out how to do it.
Here is a tutorial how to create a webView, the video starts at the whole delegate thing where i struggled with.
The video is still for the interface builder instead of the storyboard but the idea is very much the same.

Inheritance in UIView in Xcode

So our problem is how to use inheritance using Xcode.
We have developed BB app. In which we needed a header at every screen. So made a BasicScreen and extended every screen from it.
What we need in Xcode is the same scenario but unluckily we cannot figure out how to role with it.
Can any one suggest us how to implement this or better way to do this...!!
examples or some useful links shared will be highly appreciated.
For this purpose you need to add header on each view or make a parent view and add subviews in that view below the coordinates of header.
This is not Xcode question. First read about inheritance in Objective C:
http://www.techotopia.com/index.php/Objective-C_Inheritance
Second: if you want to use your custom view add the header where this view is declared.
Edit:
It is probably a good idea to use UIViewController instead of UIView. In this case you can use Interface Builder, that will save you a lot of time and make your code more elegant. Google about that, there are tons of info.

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.