Search Results

Search found 7 results on 1 pages for 'user249488'.

Page 1/1 | 1 

  • How to use drag and drop within a UIScrollView

    - by user249488
    I am trying to drag and drop UIViews within a UIScrollView. I'd like the UIScrollView to scroll if I drag a UIView so that it intersects the top or bottom of the ScrollView. If it touches the top, it should scroll up. If it touches the bottom, it should scroll down. Once the UIView is moved such that it is no longer intersecting the top or bottom, the scrolling should stop. The first approach I tried was to start an NSTimer whenever I detected that the UIView intersected with the top or bottom of the scrollview. The timer would scroll the UIScrollView bit by bit until it was invalidated. This resulted in very jerky scrolling, since there is no way to predict when the timers will fire. My current approach is to simply scroll all the way to the top or bottom of the ScrollView, like this: [UIView beginAnimations:nil context:NULL]; [UIView setAnimationCurve:UIViewAnimationCurveEaseInOut]; [UIView setAnimationDuration:1.0]; [self.parentScrollview setContentOffset:newOffset animated:NO]; [UIView commitAnimations]; In order to stop scrolling, I try to determine the position of the touch in the touchesMoved: delegate, and use that to calculate the contentOffset to use for the scrollView. The problem is, when I try to get the location in the view via [[touches anyObject] locationInView:self], I get the final end location, rather than the current location. I'm guessing that's because the contentOffset on the scrollView is set immediately. Is there a way to get the actual location of a touch in a situation like this? Or any other way to set the contentOffset when I interrupt the scrolling animation?

    Read the article

  • How to get UIScrollView contentOffset during an animation

    - by user249488
    I am trying to get the contentOffset property of a UIScrollView in the middle of a setContentOffset animation. Note I am not using the animated property of the method, but instead enclosing the setContentOffset operation within a UIView animation block so I can have finer control. When I try to read the value of contentOffset in the middle of the animation, it returns the final value rather than the value at that moment. I know that you can use the presentationLayer to get the current layer, but is there any way you can get the current offset in the middle of an animation?

    Read the article

  • Can YQL parse web sites requiring cookie-based authentication?

    - by user249488
    First, my use case: I'm trying to use YQL's built in XPATH capabilities to scrape content from Yahoo! Fantasy Sports. It uses some sort of cookie-based authentication scheme. Basically, the sequence is: 1) Do an HTTP GET on the Yahoo! Login page 2) Parse the hidden inputs from the response and do an HTTP PUT with your Yahoo! Login on the form URL 3) Use the cookies returned from step 2 to GET any of the Fantasy Sports! websites that you have access to My question is, does YQL support doing this to scrape data? The only authentication based examples I've seen use OAuth, but I haven't seen any examples of using YQL to parse websites with cookie-based authentication schemes

    Read the article

  • How easy is it to hack a plist file in an app store app?

    - by user249488
    Don't worry, I'm not trying to hack someone else's app, if that's what you're thinking =). I want to have 2 versions of my app, a free version and a deluxe version. My plan was to use an in-app purchase to enable the deluxe version by setting a boolean value in the plist file. My question is: is this secure or is it easily circumvented? And if it is not secure, can someone suggest a simple alternative? I don't want to download additional content, I would rather keep all of the functionality within the app and enable it somehow.

    Read the article

  • I can't use dashes in XPATH on iphone using libxml2

    - by user249488
    I'm trying to parse HTML data using KissXML for iphone. I've noticed that I can't have dashes in the id() tag, otherwise it won't evaluate. For example, if I'm trying to get the element at I would do id("foo") However, if I try to get at element , and I try id("foo-bar") the libxml2 XPATH engine doesn't seem to return anything. It works using the XPATH check for firefox, though. Anyone run into this issue and know of a reason why it's happening or have a workaround (besides using the absolute XPATH path?)

    Read the article

1