From 3039f44a087c9f156bf90bc51b2b911c02aa1067 Mon Sep 17 00:00:00 2001 From: Umer Farooq Date: Thu, 26 Oct 2023 03:42:06 +0500 Subject: [PATCH] Added the custom option to set dropdown position(TOP or BOTTOM) --- Example/iOSDropDown/Data.swift | 1 + Example/iOSDropDown/Main.storyboard | 59 +++++++++++++++-------- Example/iOSDropDown/ViewController1.swift | 10 +++- iOSDropDown/Classes/iOSDropDown.swift | 32 ++++++++++-- 4 files changed, 75 insertions(+), 27 deletions(-) diff --git a/Example/iOSDropDown/Data.swift b/Example/iOSDropDown/Data.swift index cf489a1..ead4576 100644 --- a/Example/iOSDropDown/Data.swift +++ b/Example/iOSDropDown/Data.swift @@ -13,4 +13,5 @@ public class Options { let height = ["50","80","100","150","200"] let ids = [50,80,100,150,200,50,80,100,150,200,50,80,100,150,200,50,80,100,150,200,50,80,100,150,200,50,80,100,150,200,50,80,100,150,200,50,80,100,150,200,50,80,100,150,200,50,80,100,150,200,50,80,100,150,200,50,80,100,150,200,50,80,100,150,200,50,80,100,150,200,50,80,100,150,200,50,80,100,150,200,20,80,100,150,200,00,150,200,50,80,100,150,200,50,80,100,150,200,50,80,100,150,200,50,80,100,150,200,50,80,100,150,200,50,80,100,150,200,50,80,100,150,200,50,80,100,150,200,50,80,100,150,200,50,80,100,150,200,50,80,100,150,200,50,80,100,150,200,50,80,100,150,200,50,80,100,150,200,20,80,100,150,200] let countries = [ "Afghanistan", "Albania", "Algeria", "American Samoa", "Andorra", "Angola", "Anguilla", "Antarctica", "Antigua and Barbuda", "Argentina", "Armenia", "Aruba", "Australia", "Austria", "Azerbaijan", "Bangladesh", "Barbados", "Belarus", "Belgium", "Belize", "Benin", "Bermuda", "Bhutan", "Bolivia", "Brazil", "British Indian Ocean Territory", "Brunei Darussalam", "Bulgaria", "Burkina Faso", "Burundi", "Cambodia", "Cameroon", "Canada", "Cape Verde", "Cayman Islands", "Central African Republic", "China", "Christmas Island", "Cocos (Keeling) Islands", "Colombia", "Cuba", "Cyprus", "Czech Republic", "Denmark", "Djibouti", "Dominica", "Dominican Republic", "East Timor", "Ecuador", "Egypt", "Falkland Islands (Malvinas)", "Faroe Islands", "Fiji", "Finland", "France", "France Metropolitan", "French Guiana", "French Polynesia", "French Southern Territories", "Gabon", "Gambia", "Georgia", "Germany", "Ghana", "Gibraltar", "Greece", "Greenland", "Grenada", "Guadeloupe", "Guam", "Haiti", "Heard and Mc Donald Islands", "Holy See (Vatican City State)", "Honduras", "Hong Kong", "Hungary", "Iceland", "India", "Indonesia", "Iran ", "Iraq", "Ireland", "Israel", "Italy", "Jamaica", "Japan", "Jordan", "Kazakhstan", "Kenya", "Kiribati", "Korea, Democratic People's Republic of", "Korea, Republic of", "Kuwait", "Kyrgyzstan", "Lao, People's Democratic Republic", "Latvia", "Lebanon", "Lesotho", "Liberia", "Madagascar", "Malawi", "Malaysia", "Maldives", "Mali", "Myanmar", "Namibia", "Nauru", "Nepal", "Netherlands", "Netherlands Antilles", "New Caledonia", "New Zealand", "Norway", "Oman", "Pakistan", "Palau", "Panama", "Papua New Guinea", "Paraguay", "Peru", "Philippines", "Pitcairn", "Poland", "Portugal", "Puerto Rico", "Qatar", "Reunion", "Romania", "Russian Federation", "Rwanda", "Sao Tome and Principe", "Saudi Arabia", "Senegal", "Seychelles", "Sierra Leone", "Singapore", "South Africa", "South Georgia and the South Sandwich Islands", "Spain", "Sri Lanka", "Swaziland", "Sweden", "Switzerland", "Syrian Arab Republic", "Taiwan, Province of China", "Tajikistan", "Tanzania, United Republic of", "Thailand", "Togo", "Tokelau", "Tonga", "Trinidad and Tobago", "Tunisia", "Turkey", "Turkmenistan", "Turks and Caicos Islands", "Tuvalu", "Uganda", "Ukraine", "United Arab Emirates", "United Kingdom", "United States", "United States Minor Outlying Islands", "Uruguay", "Uzbekistan", "Vanuatu", "Venezuela", "Vietnam", "Virgin Islands (British)", "Virgin Islands (U.S.)", "Wallis and Futuna Islands", "Western Sahara", "Yemen", "Yugoslavia", "Zambia", "Zimbabwe"] + let positionData = ["TOP", "BOTTOM"] } diff --git a/Example/iOSDropDown/Main.storyboard b/Example/iOSDropDown/Main.storyboard index 5ff4f17..e966455 100644 --- a/Example/iOSDropDown/Main.storyboard +++ b/Example/iOSDropDown/Main.storyboard @@ -1,11 +1,9 @@ - - - - + + - + @@ -35,7 +33,7 @@ - + @@ -53,7 +51,6 @@ - @@ -68,8 +65,8 @@ -