:
Engineering Drawing:
This code is to be imported into a third-party library ComboBox.
Code:
RootViewController.h
#import <UIKit/UIKit.h>// Join header file #import"ComboBoxView.h "@interface rootviewcontroller:uiviewcontroller{ comboboxview *_ ComboBox;} @end
Rootviewcontroller.m
- (void) viewdidload{[Super Viewdidload]; //Do any additional setup after loading the view.Self.navigationController.navigationBarHidden=YES; Nsarray*comboboxdatasource = [[Nsarray alloc] Initwithobjects:@" One",@" Both",@"three",@" Four",@"Five",@"Six",@"Seven",@"Eight", nil]; _combobox= [[Comboboxview alloc] Initwithframe:cgrectmake ( -, -,280, $)]; _combobox.comboboxdatasource=Comboboxdatasource; _combobox.backgroundcolor=[Uicolor Clearcolor]; [_combobox setcontent:[comboboxdatasource Objectatindex:0]]; [Self.view Addsubview:_combobox]; }
Drop-down Option cell