Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/aproram/Xamarin-APRTextFieldSuggestions
Xamarin.iOS Autocomplete suggestions for UITextfield in iOS
https://github.com/aproram/Xamarin-APRTextFieldSuggestions
Last synced: 3 months ago
JSON representation
Xamarin.iOS Autocomplete suggestions for UITextfield in iOS
- Host: GitHub
- URL: https://github.com/aproram/Xamarin-APRTextFieldSuggestions
- Owner: aproram
- License: mit
- Created: 2018-07-21T05:11:55.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-11-09T10:58:13.000Z (almost 6 years ago)
- Last Synced: 2024-04-22T04:50:22.495Z (7 months ago)
- Language: C#
- Size: 338 KB
- Stars: 5
- Watchers: 2
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-xamarin - Xamarin-APRTextFieldSuggestions - Xamarin.iOS Autocomplete suggestions for UITextfield in iOS. (Tools)
README
# Xamarin-APRTextFieldSuggestions
Xamarin.iOS Autocomplete suggestions for UITextfield in iOS## Screenshot
![APRTextFieldSuggestions_screenshot](https://github.com/aproram/Xamarin-APRTextFieldSuggestions/raw/master/Xamarin-APRTextFieldSuggestions_screenshot.png)
## Installation
Simply import the file ```APRTextFieldSuggestions.c``` to your Xamarin.iOS project## Usage
### In your ViewController
You can setup your suggestions in 4 simple steps inside your view controller
```c#
//1-Suggestions List To Look At
string[] theList = {"Alabama",
"Alaska",
"Arizona",
"Arkansas",
"California",
"Colorado",
"Connecticut",
"District Of Columbia"
};
//2-Initialize Suggestions Provider
APRTextFieldSuggestions suggestionsProvider1 = new APRTextFieldSuggestions();//3-Set Some Optional Styling Properties
suggestionsProvider1.suggestionRowHeight = 30;
suggestionsProvider1.suggestionFontSize = 13;
suggestionsProvider2.suggestionsBackgroundColor = UIColor.DarkGray;
suggestionsProvider2.suggestionTextColor = UIColor.White;
//4-Add Your Suggestions To Your Textfield
suggestionsProvider1.initializeSuggestions(myTextField, theList);
```
### Public Proberties
```c#
UITextField theTF;
public float suggestionRowHeight = 30;
public float suggestionFontSize = 13;
public UIColor suggestionTextColor = UIColor.Gray;public float suggestionsMaxVisibleCount = 3.4f;
public float suggestionsBackgroundAlpha = 0.9f;
public UIColor suggestionsBackgroundColor = UIColor.White;public iAPRSuggestionsTextFieldDelegate myDelegate;
```
### Delegate Methods
```c#
interface iAPRSuggestionsTextFieldDelegate
{
void suggestionTextField_userSelectedItem(int itemIndex, string itemVal);
}
```# Author
[Aproram](https://aproram.com) Feel free to contact me for any inquiries or help :)