Re: UIWebView and Mobile Safari event handling problem (iOS)
It looks like UIWebView snarfs up all the gestures by default. I had a project where I needed to see a tap on the web view without otherwise disrupting the normal behavior. I ended up creating a UITapGestureRecognizer, set its delegate to self, and then implemented -gestureRecognizer:shouldRecognizeSimultaneouslyWithGestureRecognizer:, always returning YES. Perhaps something similar would work for you. On Jan 4, 2012, at 7:05 AM, Nick wrote: Hi! I have a web page that handles finger dragging (it's a simple presentation auto generated from a PPS presentation, with pages animatedly flipped when the mouse is dragged - with the help of JavaScript). On Mobile Safari it works just fine, but on UIWebView, the pages are not being flipped.The nice page flipping animation doesn't work on UIWebView, and it behaves strangely in general. I guess I should pass somehow these dragging events to the view, so it behaves like Safari? How could I fix this? This UIWebView also handles double taps (by zooming in the view - but again, with no animation, unlike Mobile Safari), and zoomed area can't be scrolled on UIWebView (unlike Safari). Apparently because because the operation requires this dragging event, which is not passed to the web page? The main question is - why Mobile Safari renders the page correctly with all the animation, while UIWebView doesn't? Aren't they the same, in the HTML/JS rendering regard? ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: TWTweetCompose-/MFMailComposeViewController leaking under ARC!?!
I had the same problem and submitted a support request. They responded that I should submit a bug report, so it apparently is a problem with their code. I would suggest submitting a bug report. Stephen On Jan 5, 2012, at 11:22 AM, Tino Rachui wrote: Dear list, I see both of the above mentioned ViewControllers leaking memory when instrumenting on an iOS 5 device. When seeing memory leaks in Apples frameworks my natural reaction is to think its something wrong with my code especially as I've just switch to ARC. However I'm a bit puzzled in this case. I tried Apples sample code MailCompose and Tweeting (also compiled with ARC) and I see the exact same leaks. Has anybody else experienced this problem and maybe knows a solution? Thanks Tino ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/cowart_66%40hotmail.com This email sent to cowart...@hotmail.com ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Angle of touch point from center of view?
On 2012-01-05, at 1:49 PM, Eric E. Dolecki wrote: I'd like to calculate the angle from a center point of a view to a touch point. 0º behind top of screen, 180º being bottom of screen. Calculating from touchesMoved. I think you can just retrieve the arctangent between the x axis and the vector formed by the origin and location of the touch (reversing the y coordinate). For example: - (void) touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event { CGPoint center = self.center; CGPoint location = [[touches anyObject] locationInView:self]; CGPoint vectorOfInterest = CGPointMake(location.x - center.x, center.y - location.y); NSLog(@Vector: %@, Angle: %.2fº, NSStringFromCGPoint(vectorOfInterest), atan2(vectorOfInterest.x, vectorOfInterest.y) * 57.29); } The resulting angle will be [0, π) clockwise starting from the top, and [-π, 0) from the bottom (or something like that—my trig is horribly rusty). HTH, —Mt.___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com