mnbayan / AutocompleteTextfieldSwift

Simple and straightforward sublass of UITextfield to manage string suggestions
MIT License
290 stars 66 forks source link

How to use with Auto Layout ? #9

Closed tjulianb42 closed 9 years ago

tjulianb42 commented 9 years ago

So I wanted to use AutocompleteTextfieldSwift in my project, but I use Autolayout in my Main.storyboard.

I wanted to know how the TableView for results can be below the textfield. Please see the screenshot attached (I set autoCompleteTableHeight to 200.0 in this exemple)

image

Thanks

mnbayan commented 9 years ago

@tjulianb42 , could you send me a demo project for where this occured, you can use dropbox. It supposed to work even you used autolayout. The demo project is in autolayout. I'll check your constraints in the demo project you will send me.

tjulianb42 commented 9 years ago

@mnbayan Yes please see : https://mega.co.nz/#!oAAFXKZb!1_77KwN4yH9ap2aJSu427HPMtwf1jpklSHqKLQlAP1A

mnbayan commented 9 years ago

@tjulianb42 The link is not working, download always fails.

tjulianb42 commented 9 years ago

@mnbayan That's weird, is http://tjulianb.com/ACTF-test.zip or https://www.dropbox.com/s/r7puw5x1mm74y9f/ACTF-test.zip working ?

mnbayan commented 9 years ago

@tjulianb42 There is a problem with your constraints. It may look like that it is positioned well in the simulator or your device but the system reads the textfield position as x = 0, y = 0. Opening the storyboard, i found this errors. screen shot 2015-07-04 at 7 05 18 pm

I corrected your constraints, please download and take a look https://db.tt/bnvMm4m9. Make sure to add your constraints correctly.

tjulianb42 commented 9 years ago

@mnbayan Thank you! I'd like to check your corrected project but your link returns me a 404 error

mnbayan commented 9 years ago

@tjulianb42 I've edited the link.You should be able to download it now.

tjulianb42 commented 9 years ago

Thank you so much it works !

mnbayan commented 9 years ago

@tjulianb42 You're welcome.