Used in the Delphi firemonkey platform is very large, and is well organized. of course button, alone firemonkey, and written. however, under certain circumstances in the OS the native control, because you will inevitably need to use a different API, about how to use the native control to learn.
//// Xe4 & IOS button example//// Http://blog.naver.com/simonsayz//// Ref.// Sampleniblessapp: http://rvelthuis.de/zips/sampleniblessapp.7z// Cr. nsalerthelper: http://code.google.com/p/delphi-foundations/// Delegate example: http://blogs.embarcadero.com/teamj/2013/05/09/3817/// Xe2, free Pascal: http://blog.naver.com/simonsayz/120162838290// Source to HTML: http://www.duketown.com/marcel/hyperdelphi.shtml//UnitUnit1;InterfaceUsesSystem. sysutils, system. types, system. uitypes, system. classes, system. variants, FMX. types, FMX. controls, FMX. forms, FMX. dialogs, FMX. stdctrls, FMX. platform. IOS, FMX. layouts, FMX. memo,//System. typinfo, macapi. objectivec, macapi. objcruntime, iosapi. cocoatypes, iosapi. Foundation, iosapi. uikit, iosapi. CoreGraphics;Type //Ibtndelegate =Interface(Nsobject)ProcedureBtnpressed;Cdecl;End;//Tbtndelegate =Class(Toclocal)PrivateFinx: integer; fmemo: tmemo;Public ConstructorCreate (random: integer; memo: tmemo );FunctionGetobjectivecclass: ptypeinfo;Override;ProcedureBtnpressed;Cdecl;End;//Tform1 =Class(Tform) button1: tbutton; memo1: tmemo;ProcedureButton1click (Sender: tobject );Private PublicBtndelegate: tbtndelegate;End;VaRForm1: tform1;Implementation{$ R *. FMX}ConstructorTbtndelegate. Create (values: integer; memo: tmemo );Begin InheritedCreate; self. finx: = 10; self. fmemo: = memo;End;FunctionTbtndelegate. getobjectivecclass: ptypeinfo;BeginResult: = typeinfo (ibtndelegate );End;//ProcedureTbtndelegate. btnpressed;BeginINC (finx); fmemo. lines. Add ('ios BTN pressed '+ inttostr (finx ));End;//ProcedureTform1.button1click (Sender: tobject );VaRBTN: uibutton;Begin //Memo1.lines. Add ('fmx BTN pressed ');//BTN: = tuibutton. Wrap (tuibutton. occlass. buttonwithtype (uibuttontyperoundedrect ));//BTN. setframe (cgrectmake (40,130,240,100); BTN. settitle (nsstr ('ios uibutton pressed '), uicontrolstatenormal );//Btndelegate: = tbtndelegate. Create (10, memo1 );//BTN. addtarget (btndelegate. getobjectid,// TargetSel_getuid ('btnpressed '),// ActionUicontroleventtouchdown );// Event //Define whandletoplatform (self. Handle). View. addsubview (BTN); // highlights !!! Cnsoft markEnd;End.