Can I develop an application on web to draw something on iPhone? I guess not because when I draw in the browser it will be treated as "dragging" but I just want to double check for a solution out there.
Thanks.
Marcelo
I presume you mean to ask if is possible to draw into a UIWebView?
I don't think so. In UIWebView the page display view is embedded in a scroll view and scroll views trap all touches to determine if they can scroll. It's pretty much configured as read only.
You could in theory put a transparent view over the web view to trap the touches then send those to the the actual browser view. I haven't done it but it might possible.
Related
Is it possible/safe to make an UIKit based app zoomable globally? (The entire app view is pinch zoomable).
I think it similar with web page (html based app) zoom functionality inside UIWebview.
Yes, it is possible.
To achieve this, just add your UIView to a UIScrollView that covers the whole window.
I want to handle touches on UIWebView same as we can handle touches on UIView.I want to use methods like touches began,touch ended,etc in this app.I have to handle multiple events on different touching events on UIWebView.
In this app I am displaying image in UIWeb View and i have to make image size large and small on double touch and when the user taps on that image the next image should appear and again if the user double taps that image it should navigate to another page and if user swipes then also next image should appear.Thus,i have to handle four events on touching UIWebView.
Please anyone tell me how to do this.I have tried many codes but nothing has helped me.I also tried by making a uiview on uiwebview but only one event happens by this other events does not.
Thanks in Advance.
For what you want to do it sounds as if you shouldn't be using a uiwebview at all. I suggest you reconsider your app's architecture: typically both touch events AND page navigation (both of which you're attempting) are handled in view controllers. Consider implementing a view controller that will handle these events.
Also, don't solicit code and ask for it hand-delivered via email. No one wants to write your code, and you won't learn anything that way anyway.
What I want to accomplish is something like this:
Two different scrollViews, and each one scrolls horizontically. Each showing 3 images, and a half one (or 1/3th) piece of the next image in the datasource of the scrollview.
Does anyone know how to accomplish such a scrollview?
I also want to be able to tap an image to flip it and show some information and a button to the detail. (See lower scrollview).
Tapping it again would just show back the image, much like the coverflow ui inside itunes, but without the coverflow being 3D...
Any help is welcome :)
Thanks in advance,
Lewion
Scroll view doesn't have a datasource. What you are looking for is standard scrolling and nothing special.. So it is definitely doable... Check the scrolling and photo scroller sample codes from apple developer samples. For more implementations of scroll view check the scroll view suite sample code and read the scroll view programming guide.
The flip animation is also a standard animation for a view and is easily doable. For example, create a utility application for iphone. It has a flip side view. See how that animation is done.
Is there a way in cocoa touch to implement view switching behavior like the one in iPhone's springboard? I mean horizontal scrolling with 'snap to view' animation (views are switched only after certain 'scrolling' threshold has been reached)
Look at the 'pagingEnabled' property on UIScrollView.
SpringBoard, App Store and Mobile Safari use a UIPageControl in conjunction with a UIScrollView to provide the little dots you see at the bottom of the screens, that you swipe across with that snap effect.
What views you want to swipe through depends on your application, though, as you're essentially swiping through a UIScrollView.
This isn't an answer, but I know it's possible. I have seen this behavior in "Twitter for iPhone" and asked myself the same question. If you use that app, check out what happens when you swipe the individual tweets to reveal more controls underneath.
This looks like it's part of TableCellView and some touch drag combination. As for the implementation of that... well, im too novice right now.
I'm trying to create a modal status indicator display for an iPhone app, and would like one similar to this one used in Tweetie:
Specifically, this one "shades out" the entire screen, including the toolbar. I don't believe through any normal UIView manipulation, I can extend past the bounds of my window, can I? I believe I've seen a status indicator like this somewhere else on iPhone, possibly when I added an Exchange e-mail account.
I've tried subclassing UIAlertView and overriding its drawRect method. If I don't call [super drawRect:] it doesn't ever display the normal UIAlertView text box, however my drawing rectangle is in an odd size and position.
Anyone have any advice to accomplish this?
Check out MBProgressHUD.
Take a look at the source code to the WordPress application. They have code which you can basically drag and drop into your application to do this.
http://iphone.wordpress.org/development/
I haven't done this myself, but you could layer a UIView at the top of the view hierarchy, and use setHidden to dynamically show or hide it. Since it's at the top of the stack, it should be able to intercept all touch events.