MLPAutoCompleteTextField icon indicating copy to clipboard operation
MLPAutoCompleteTextField copied to clipboard

Suggestions are not showing up on iPhone 4 IOS 6.1.3

Open lironsher opened this issue 11 years ago • 6 comments

The Demo code is not running on iPhone 4 IOS 6.1.3 while running on iPhone 4S (6.1.3) and iPhone 5 (6.0.4) Any Ideas ?

lironsher avatar Jul 21 '13 08:07 lironsher

Just tried it on an iPhone 4 running iOS 7 this morning, confirmed that the suggestions don't show up when you start typing.

In the DEMOViewController, If I comment out this method:

  • (void)autoCompleteTextField:(MLPAutoCompleteTextField *)textField possibleCompletionsForString:(NSString *)string completionHandler:(void (^)(NSArray *))handler

And uncomment this one:

  • (NSArray *)autoCompleteTextField:(MLPAutoCompleteTextField *)textField possibleCompletionsForString:(NSString *)string

Thereby avoiding the asynchronous fetching, the suggestions appear.

The problem I suspect is in line 169: dispatch_queue_t queue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_BACKGROUND, 0);

If you place a breakpoint after the dispatch_async in this same method inside the block, such as at line 171, it will never get called, but it should...

Since this delegate method is part of the DEMOViewController and not part of the MLPAutoCompleteTextField source code you shouldn't have a problem in your app as long as your implementation of the delegate method works right.

EddyBorja avatar Jul 22 '13 14:07 EddyBorja

I have this problem too. Tested my App for the first time on an iPhone 4 with iOS 6.1.2, and when the suggestion box tried to load, nothing happened. After this, when I pushed/popped the view with the MLPAutoCompleteTextField, the application hung. It didn't crash, it just hung until I force quitted it.

This does not occur in the iPhone 6.1 simulator with 3,5" retina display.

Why would this only occur on the iPhone 4? Does it's processor handle asynchronous queues differently?

Other than this, great work on this subclass! It's a really impressive fast auto-complete implementation.

Thermometer91 avatar Jul 23 '13 10:07 Thermometer91

I don't remember all the hardware specific details of the iPhone 4 anymore. Solving this problem will just take some experimentation.

EddyBorja avatar Jul 23 '13 14:07 EddyBorja

the same problem on the iPod touch 4-th generation (iOS 6.1.2)

3a4oT avatar Aug 08 '13 13:08 3a4oT

Hi,

iPhone 4 under iOS 6.1.2 works like a charm, the colors and the UI style are not really matching but it works.

damien-rivet avatar Mar 26 '14 09:03 damien-rivet

Hm, really odd. Great that it works somewhat though. Some obscure details must have changed.

On Wed, Mar 26, 2014 at 5:49 AM, Damien R. [email protected] wrote:

Hi,

iPhone 4 under iOS 6.1.2 works like a charm, the colors and the UI style are not really matching but it works.

Reply to this email directly or view it on GitHubhttps://github.com/EddyBorja/MLPAutoCompleteTextField/issues/11#issuecomment-38665208 .

EddyBorja avatar Mar 27 '14 04:03 EddyBorja