Coder Social home page Coder Social logo

ios-autocomplete's People

Contributors

bogdantc avatar david-livadaru-3pillarglobal avatar dmacra avatar flaviu88 avatar geluard avatar mmx1 avatar rcristian avatar valentinaiancu3pg avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ios-autocomplete's Issues

Objc Project with mixed swift code fails to build

I have an objc project with swift mixed in. When I try to import the framework to a swift file the build fails with the following error:

Include of non-modular header inside framework module

There are 4 errors on the following import statements:

#import <AutoCompletion/AutoCompletionTextFieldDataSource.h>
#import <AutoCompletion/AutoCompletionAnimator.h>
#import <AutoCompletion/AutoCompletionTextFieldDelegate.h>
#import <AutoCompletion/AutoCompletionTextField.h>

I've tried updating the building settings for "allow Non-modular includes..." to yes, to no success. I've updated cocoapods, and ran pod update and install. As well as deleting derived data. Has this issue been seen before. If I'm just missing something obvious, that would be great.

Code is not working

Hi I have downloaded the code as zip from here and try to run but there is no appdelegate and didn't have any viewcontroller.How I can check the code whether it is working or not.
Even demo branch code is not working.
Can you please provide link of working code.

Terminating app due to uncaught exception 'NSInvalidArgumentException'

I added this control as suggested but app is getting terminated with following debug log.

2016-09-29 17:40:49.629 DiscoverFood[34834:839608] -[UITextField setSuggestionsResultDataSource:]: unrecognized selector sent to instance 0x7fa926c4ae50
2016-09-29 17:40:49.633 DiscoverFood[34834:839608] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UITextField setSuggestionsResultDataSource:]: unrecognized selector sent to instance 0x7fa926c4ae50'
*** First throw call stack:
(
0 CoreFoundation 0x000000010bd9634b exceptionPreprocess + 171
1 libobjc.A.dylib 0x0000000110a4221e objc_exception_throw + 48
2 CoreFoundation 0x000000010be05f34 -[NSObject(NSObject) doesNotRecognizeSelector:] + 132
3 CoreFoundation 0x000000010bd1bc15 __forwarding
+ 1013
4 CoreFoundation 0x000000010bd1b798 _CF_forwarding_prep_0 + 120
5 DiscoverFood 0x000000010b05e9a4 -[CreateNewFoodOnlyViewController viewDidLoad] + 148
6 UIKit 0x000000010d63c06d -[UIViewController loadViewIfRequired] + 1258
7 UIKit 0x000000010d6424d6 -[UIViewController __viewWillAppear:] + 118
8 UIKit 0x000000010d66d393 -[UINavigationController _startCustomTransition:] + 1290
9 UIKit 0x000000010d67e008 -[UINavigationController _startDeferredTransitionIfNeeded:] + 697
10 UIKit 0x000000010d67f19b -[UINavigationController __viewWillLayoutSubviews] + 58
11 UIKit 0x000000010d8761b7 -[UILayoutContainerView layoutSubviews] + 223
12 UIKit 0x000000010d55f344 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 1237
13 QuartzCore 0x000000010fd70cdc -[CALayer layoutSublayers] + 146
14 QuartzCore 0x000000010fd647a0 _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 366
15 QuartzCore 0x000000010fd6461e _ZN2CA5Layer28layout_and_display_if_neededEPNS_11TransactionE + 24
16 QuartzCore 0x000000010fcf262c _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 280
17 QuartzCore 0x000000010fd1f713 _ZN2CA11Transaction6commitEv + 475
18 QuartzCore 0x000000010fd20083 _ZN2CA11Transaction17observer_callbackEP19__CFRunLoopObservermPv + 113
19 CoreFoundation 0x000000010bd3ae17 CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION + 23
20 CoreFoundation 0x000000010bd3ad87 __CFRunLoopDoObservers + 391
21 CoreFoundation 0x000000010bd1fb9e __CFRunLoopRun + 1198
22 CoreFoundation 0x000000010bd1f494 CFRunLoopRunSpecific + 420
23 GraphicsServices 0x000000011212ba6f GSEventRunModal + 161
24 UIKit 0x000000010d49af34 UIApplicationMain + 159
25 DiscoverFood 0x000000010af0b5cf main + 111
26 libdyld.dylib 0x0000000111c5368d start + 1
27 ??? 0x0000000000000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException

Here is my code.

import "CreateNewFoodOnlyViewController.h"

import "DataManager.h"

import "DetailFoodViewController.h"

import "AppSettings.h"

import "FoodFetchOperation.h"

import "CustomCMFood.h"

@interface AutoCompletionDataSource: NSObject

@Property(strong,nonatomic) NSOperationQueue *fetchQueue;

@EnD

@implementation AutoCompletionDataSource

  • (instancetype)init
    {
    if (self = [super init]) {
    _fetchQueue = [[NSOperationQueue alloc] init];
    _fetchQueue.name = [NSString stringWithFormat:@"Fetch operation :%d",arc4random()];
    }
    return self;
    }

  • (void)fetchSuggestionsForIncompleteString:(NSString*)incompleteString
    withCompletionBlock:(FetchCompletionBlock)completion
    {
    if (_fetchQueue.operationCount > 0) {
    [_fetchQueue cancelAllOperations];
    }

    FoodFetchOperation *operation = [[FoodFetchOperation alloc] initWithCompletionBlock:^(NSArray *items) {
    dispatch_async(dispatch_get_main_queue(), ^{
    completion(items,@"title");
    });

    } incompleteString:incompleteString];

    [_fetchQueue addOperation:operation];
    }

@EnD

@interface CreateNewFoodOnlyViewController ()

@Property (strong, nonatomic) IBOutletCollection(UITextField) NSArray *textFields;

@Property (strong, nonatomic) UITextField *activeTextField;
@Property (strong, nonatomic) NSArray *inputAccessoryViews;

@EnD

@implementation CreateNewFoodOnlyViewController

//========================================================================================================================

  • (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
    {
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self) {
    // Custom initialization
    }
    return self;
    }

//========================================================================================================================

  • (void)viewDidLoad
    {
    [super viewDidLoad];
    AutoCompletionDataSource* autoCompletionDataSource = [[AutoCompletionDataSource alloc] init];
    m_txtFoodName.suggestionsResultDataSource = autoCompletionDataSource;
    m_txtFoodName.suggestionsResultDelegate = self;
    }

please help

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.