Annotation in UIWebview in iphone sdk - uiwebview

I need help for, scribbling on the webpage i.e where ever the user moves on the uiwebview there it should draw a line according to the touch moves.
Is this possible.
Can any one please help me in this.
Thanks,
Mrudula.

yes it is possible just you have to write uiWebView.scrollView instead of uiWebView for getting coordinates of uiwebview.

I started working on something sort of like this. It doesn't currently let you "draw", but it does let you detect and record relative touch coordinates so that you can scale them correctly when zooming in. The DSAnnotationView object lets you provide a custom UIView to be toggled at the annotation point. Check it out here: https://github.com/justindarc/WebViewAnnotations
-Justin

Related

Blender : Some objects disappear when I turn to camera mode (it's not the snapping I think)

OK... here is the thing...
I am modeling a Star Wars Cruiser.. I'm doing pretty fine, but.. whenever I look through the camera, half of my ship disappears ?! Now you might think it's the clipping, but that doesn't make sense, since the clipping is set to 0,1 mtr - 10.000 mtr, which should be more than enough. Besides that, the clipping is the same for both the visible and now disappeared objects...
Does anyone have any clue ?
I also tried to change the Local view to Global view.. but no dice...
Here is a screenshot in not-camera view :
And here is one in camera view : i.imgur.com/XaxAHIN.png
I'm using Blender 2.82
Please let me know if you need more info or even a link to the model...
OK, I got some help from a friend... Joshua Rooijakkers from the Netherlands...
He fixed the problem in seconds...
So ... it WAS the clipping.. the setting was just buried somewhere I didn't look...
Thanks Josh ! :-)
Objects disappear in camera view modeWhile setting up my camera with the camera lock to view option selected, I noticed that on switching on to the camera view, the object had disappeared.
I tried zooming in and out, but that did not work. I exited the camera view and then selected the object in the outliner and then tried zooming in and out and then panning down and adjusting the view in the view port. I could see that the object was now visible and that the camera was positioned below the object. That was because the camera was added wrt to the position of the cursor which was snapped to the world origin. I a sure many would have encountered such issues.
I then selected the camera to ascertain its position. Then by using the grab tool, I moved the camera along the Z axis just above the object and then switched to the camera view and selected the lock camera to
view option to adjust the camera view to the desired position.
This helped me locate my object in the camera view. Do let me know in the comments if there are other ways of dealing with this.

How to display a webview in full screen (autofit)

I am developing a webview app.
I need that the webview covers all the content (all the space available!) but I can't get to this...
I've tried several ways but stil don't understand how to tell the webview to autofit depending on the screen.
Here is my situation now:
And this if I rotate the device
I guess this means that I'm not working in the right way, eh ? Can anybody lead me to this right?
thank you
Add this 4 constraint like this for your webView.

Rotating IPad Screen Orientation on Different Views

I have an iPad application that opens up in portrait mode but when I switch to another view I need to force the orientation to landscape so that the user realises they need to physically move the screen orientation to landscape, and then when they leave this view I need to force the orientation back to portrait.
I can see the ShouldAutorotateToInterfaceOrientation(UIInterfaceOrientation toInterfaceOrientation) which if believe correctly just restricts the orientations that are possible for the view but setting this to one orientation (e.g. UIInterfaceOrientation.LandscapeRight) doesn't force the orientation to change.
I've seen some other suggestions about forcing the View to rotate using this.View.Transform.Rotate(...) but doesn't seem to work for me.
Just wondering if anyone had any suggestions or be able to point me in the right direction?
Thanks
Are your views all displayed within a single uinavigationcontroller?
If they are, then I'm afraid that the answer is that you cannot achieve what you are looking to - see a full explanation, including links to the Apple developer docs on: How to constrain autorotation to a single orientation for some views, while allowing all orientations on others?
If you do want to achieve the effect you are looking for the, then maybe switch to using some other "parent" for all your child views - e.g. displaying them modally?
First, set ShouldAutorotateToInterfaceOrientation to support landscape orientation only.
Then use this hack to force orientation change:
var c = new UIViewController ();
PresentModalViewController (c, false);
DismissModalViewControllerAnimated (false);

Capturing Gestures over a UIWebView

I am trying to set up a simple iPad application that has a table view and when you select a row for that table it displays a (drilled down to) UIWebView displaying the selected web page (related to the row selected).
Once in the drilled-down-to view I want to capture EVERY touch and gesture (tap, swipe, pinch, etc) and do my own thing with them. Yes, I know this will make navigating and interacting with the web page displayed impossible, that's the idea.
I have found and played around with the Stack Overflow question that was answered by this wepage: http://mithin.in/2009/08/26/detecting-taps-and-events-on-uiwebview-the-right-way/ and I can't get gestures to work with idea.
Any suggestions would be greatly appreciated. Thanks!
UIWebView already has a lot of gestureRecognizer attached to them. It might be a good idea to remove all those gesture recognizer before adding yours, as a testing unit.
If your gesture recognizer works, that means you could basically store the default recognizer in a private array and as soon as you want to give normal behavior to your webview again, you "reset" the UIWebView recognizer

Draw over camera using JAVA ME

I'm wondering if there is anyway for drawing somethin over the videoControl.
I tried using LWUIT but I can't achieve any result, have anybody done somethin similar? Any help will be appreciate
Nope very few devices will support this. JSR135 camera viewfinder images seem to get drawn by the hardware external to Java, and it gets drawn over whatever you already have on the screen. Nothing you can do about it :(
If you're application user don't argue slow refresh rate I think you can use snapshot feature of VideoControl.
Do not show preview of VideoControl (Hide, Make it's size as zero ...)
Take snapshot from VideoControl
Draw captured image on Canvas
Draw something on it
Do it repeatedly
LWUIT do not help for this issue. It's just graphical widget library on the MIDP Canvas.

Resources