Home ? Source Code ? iPhone ComboBox

iPhone ComboBox

maninwest
2015-02-11 03:58:36
The author
View(s):
Download(s): 0
Point (s): 1?
Category Category:
MobileMobile Objective-CObjective-C

Description

(void)doneClicked:(id)sender { [textField resignFirstResponder]; //hides the pickerView }
Attached Source Code


iPhoneComboBox_src.zip contains the subclassedControllerViewfor easy integration with an existing project.
iPhoneComboBox_demo.zip contains the source code of a demo application that usesComboBox ControllerView.
Using the Code


Open Xcode and create a "Single View Application", name itComboBoxTest.
Make sure that "Use Automatic Reference Counting" is checked.
Download and unzip iPhoneComboBox_src.zip to a folder named ComboBox (double click on the zip file).
Drag and drop the ComboBox folder to the project in Xcode.
Make sure that "Copy items into destination groups's folder" is checked.
Make sure that "Create groups for any added folders" is checked.
Edit ViewController.h: Add#import "ComboBox.h", declareComboBox* combo1;
The header file should look like this:
 北单比分zhibo www.603090.live #import  #import "ComboBox.h" @interface ViewController : UIViewController
{
    ComboBox* combo1;     
}
@end

Edit ViewController.m, add the following toviewDidLoad:
NSMutableArray* fruitsArray = [[NSMutableArray alloc] init];
[fruitsArray addObject:@"Apple"];
[fruitsArray addObject:@"Banana"];
[fruitsArray addObject:@"Orange"];
    
combo1 = [[ComboBox alloc] init];
[combo1 setComboData:fruitsArray]; //Assign the array to ComboBox [self.view addSubview:combo1.view];
combo1.view.frame = CGRectMake(110, 69, 120, 31); //ComboBox location and  //size (x,y,width,height)

Build and run, that's it.

Sponsored links

File list

Tips: You can preview the content of files by clicking file names^_^
Name Size Date
01.96 kB
.DS_Store6.00 kB2012-03-12|06:47
01.96 kB
01.96 kB
._.DS_Store244.00 B2012-03-12|06:47
01.96 kB
.DS_Store6.00 kB2012-03-12|06:48
01.96 kB
._.DS_Store244.00 B2012-03-12|06:48
AppDelegate.h330.00 B2011-12-17|09:13
._AppDelegate.h295.00 B2011-12-17|09:13
AppDelegate.m2.36 kB2011-12-17|09:13
._AppDelegate.m295.00 B2011-12-17|09:13
01.96 kB
.DS_Store6.00 kB2011-12-17|09:14
01.96 kB
._.DS_Store244.00 B2011-12-17|09:14
arrow.png1.34 kB2011-12-17|04:12
._arrow.png244.00 B2011-12-17|04:12
ComboBox.h472.00 B2012-03-12|06:45
._ComboBox.h171.00 B2012-03-12|06:45
ComboBox.m2.62 kB2012-03-12|07:27
._ComboBox.m171.00 B2012-03-12|07:27
ComboBox.xib9.35 kB2012-03-12|07:24
._ComboBox244.00 B2012-03-12|07:27
ComboBoxTest-Info.plist1.07 kB2011-12-17|04:15
._ComboBoxTest-Info.plist244.00 B2011-12-17|04:15
ComboBoxTest-Prefix.pch327.00 B2011-12-17|04:15
._ComboBoxTest-Prefix.pch295.00 B2011-12-17|04:15
01.96 kB
.DS_Store6.00 kB2011-12-17|09:14
01.96 kB
._.DS_Store244.00 B2011-12-17|09:14
InfoPlist.strings45.00 B2011-12-17|04:15
._InfoPlist.strings295.00 B2011-12-17|04:15
ViewController.xib13.91 kB2012-03-12|07:04
._en.lproj244.00 B2012-03-12|07:04
main.m302.00 B2011-12-17|09:13
._main.m295.00 B2011-12-17|09:13
ViewController.h349.00 B2012-03-12|07:10
._ViewController.h171.00 B2012-03-12|07:10
ViewController.m3.02 kB2011-12-17|09:11
._ViewController.m295.00 B2011-12-17|09:11
._ComboBoxTest244.00 B2012-03-12|07:10
01.96 kB
project.pbxproj12.93 kB2011-12-17|04:15
01.96 kB
._project.pbxproj244.00 B2011-12-17|04:15
01.96 kB
contents.xcworkspacedata157.00 B2011-12-17|04:15
01.96 kB
._contents.xcworkspacedata244.00 B2011-12-17|04:15
01.96 kB
01.96 kB
UserInterfaceState.xcuserstate17.13 kB2012-03-12|07:28
01.96 kB
._doralon.xcuserdatad244.00 B2012-03-12|07:28
._xcuserdata244.00 B2011-12-17|04:15
._project.xcworkspace244.00 B2011-12-17|04:15
01.96 kB
01.96 kB
01.96 kB
Breakpoints.xcbkptlist91.00 B2012-03-12|07:25
01.96 kB
ComboBoxTest.xcscheme3.04 kB2011-12-17|04:15
01.96 kB
01.96 kB
01.96 kB
._ComboBoxTest.xcscheme244.00 B2011-12-17|04:15
xcschememanagement.plist484.00 B2011-12-17|04:15
._xcschememanagement.plist244.00 B2011-12-17|04:15
._xcschemes244.00 B2011-12-17|04:15
._doralon.xcuserdatad244.00 B2012-03-12|07:08
._xcuserdata244.00 B2011-12-17|04:15
._ComboBoxTest244.00 B2012-03-12|06:44
...
Sponsored links

Comments

(Add your comment, get 0.1 Point)
Minimum:15 words, Maximum:160 words
  • 1
  • Page 1
  • Total 1

iPhone ComboBox (45.58 kB)(7.41 kB)

Need 1 Point(s)
Your Point (s)

Your Point isn't enough.

Get 22 Point immediately by PayPal

Point will be added to your account automatically after the transaction.

More(Debit card / Credit card / PayPal Credit / Online Banking)

Submit your source codes. Get more Points

LOGIN

Don't have an account? Register now
Need any help?
Mail to: [email protected]

切換到中文版?

CodeForge Chinese Version
CodeForge English Version

Where are you going?

^_^"Oops ...

Sorry!This guy is mysterious, its blog hasn't been opened, try another, please!
北单比分zhibo

Warm tip!

CodeForge to FavoriteFavorite by Ctrl+D
{ganrao} 天津时时彩计划客户端 pk10手机智能计划软件 福彩3d中奖规则及奖金 时时彩的全部开奖软件 股票融资交易流程 福建快三开奖结果昨天 p62怎么兑奖 哪个网站可以赌钱 七乐彩开奖结果走势图标准版 今天湖南快乐十分走势图 韩国快乐8开奖号码 快乐扑克3基本走势图 山东十一选五走势图爱彩乐 北京pk拾赛车历史开奖记录 山西新11选五胆码推荐 分分彩输得我好惨