ipad - Smooth scrolling of text (Autoscroll) in UITextView iOS -


I'm working on a project where I have some text in UItextview App wants to continuously smooth scroll text and also Wants to manage your scrolling speedI mean that the text should scroll smoothly and the app has a slider where I can manage the speed. Below is some sample code I am using.

It works well in the simulator, but it runs with the jerk in the device or should I need to pause after some line. Can you please suggest any solution? Any suggestion will be appreciated.

NSTimers actually fire incidents in connection with the NSRun loop attached from time to time, (Or should be), therefore, if you have a child (or background) running in a separate thread, then NSTIMERS will set fire to NSRunLoop of that thread instead of NSRunLoop of that formula.

A fire at the NSTimer event thread where you have a timer. If you have set a timer on the main run loop, the timer will set fire on the main thread and secure and synchronized. With input events

So I have some suggestions to try (I'm not sure how successful it will be in your case)

Do not use NSTimer from the main thread by the selector "After Try calling in "as in the code

  [self display selector: @ object with selector (autosolol): after zero: 19];   

Use KVO to trigger an event or NSNotification may occur. (Do not do it straight, I think a better approach.)

I like KVO, so to write it, write the following steps: - Make a square with a variable of NSN ( Which should be accessible outside the square). Make the purpose of that square and add an inspector to it. (Model here is the purpose of that class). [Modal addObasever: The path to self: @ "name" option: (NSKeyValueObservingOptionOld | NSKeyValueObservingOptionNew) Reference: Zero];

This implements representative methods.

  - (zero) Inspection of valuefire: (NSString *) keypab object: (id) object change: (NSDictionary *) change reference: (zero *) reference What to do is to call it every time whenever there is any change in that class variable. }   

Make a method in the controller "autocross" which is called by the selector later. And make changes in the value of the NSNumber vairabe value (no logic does not affect a lot of value in incremental way).

Hope this helps you !!! Try it ... best luck

Comments

Popular posts from this blog

Java - Error: no suitable method found for add(int, java.lang.String) -

java - JPA TypedQuery: Parameter value element did not match expected type -

c++ - static template member variable has internal linkage but is not defined -