<span id="Label3"></p>1. Trimmer (uistepper)<p><p>IOS5 added ui, contains <code>+</code> , <code>-</code> two buttons, inherits the Uicontrol</p></p><p><p>Supported Properties:</p></p> <ol> <ol> <li><p>Value</p> <ul> <li>Minimum</li> <li>Maximum</li> <li>Current</li> <li>Step</li> </ul></li> <li><p>Behavior</p> <ul> <li>Autorepeat hold the plus sign and the number will continue to change</li> <li>When continuous is yes, the user interaction immediately departs the valuechanged event, NO means that only when the user interaction ends ValueChanged event</li> <li>Wrap will change to min when Yes,value is added to more than maximum Value.</li> </ul></li> </ol> </ol><p><p>To set a custom appearance:</p></p><p><p>Setdecrementimage: (uiimage*) Image Forstate:</p></p><p><p>Setincrementimage: (uiimage*) Image Forstate:</p></p>2. Web Page Control (uiwebview)<p><p>Common Properties:</p></p> <ol> <ol> <li><code>scalesPageToFit</code>Controls whether the Web page is scaled to fit the space</li> <li><code>dataDetectorTypes</code>Detecting data for a specified type of page: phone, hyperlink, address</li> </ol> </ol><p><p>Load the content as Follows:</p></p> <ol> <ol> <li><code>-loadHTMLString:baseURL:</code>Loading and displaying HTML strings</li> <li><code>loadRequest:</code>Load and display the corresponding Web page for the specified URL</li> <li><code>stringByEvaluatingJavaScriptFromString</code>Executes the specified JavaScript string and returns the execution result</li> </ol> </ol><p><p>Control Navigation Methods:</p></p> <ol> <ol> <li><code>-goBack:</code>Back off</li> <li><code>-goForward:</code>Forward</li> <li><code>-reload:</code>Reload Web page</li> <li><code>-stopLoading</code>Stop loading</li> </ol> </ol><p><p>UIWebView the delegate <code>UIWebViewDelegate</code> , including the Method:</p></p> <ol> <ol> <li><code>-webView:shouldStartLoadWithRequest:navigationType:</code>Starting when loading a Web page for a specified URL</li> <li><code>-webViewDisStartLoad:</code>Departure when loading starts</li> <li><code>-webViewDiFinishLoad:</code>Departure when loading complete</li> <li><code>-webView:didFailLoadWithError:</code>Mount response Error triggered</li> </ol> </ol>3. Tool Strip (uitoolbar)<p><p>Uitoolbar inherits uiview, usually as a container for multiple uibarbuttonitem, and each uibarbuttonitem represents a control on the toolbar.</p></p><p><p>Properties supported by Uitoolbar:</p></p> <ul> <ul> <li>Barstyle style of the tool bar</li> <li>items, Nsarray objects, containing multiple Barbuttonitem objects</li> </ul> </ul><p><p>Uitoolbar can be placed on any control, as long as the control is wrapped into uibarbuttonitem.<br>Initialization method for Uibarbuttonitem:</p></p> <ul> <ul> <li><code>- initWithTitle:style:target:action:</code>Initialize wrapper a normal button</li> <li><code>-initWithImage:style:target:action:</code>Packaging Uiimageview</li> <li><code>-initWithBarButtonSystemItem:target:action:</code>Initialize the Uibarbuttonitem of the wrapper system button</li> <li><code>-initWithCustomView:</code>Initialize the wrapper for any UI control</li> </ul> </ul>customizing toolbars<pre><code class=" hljs objectivec">uiprogressview* prog; nstimer* tbtimer;-(<span class="hljs-keyword">Void) viewdidload{[<span class="hljs-keyword">Super viewdidload];<span class="hljs-comment">Create Toolbar Uitoolbar * toolbar = [[uitoolbar alloc] Initwithframe:cgrectmake (<span class="hljs-number">0,<span class="hljs-number">0,<span class="hljs-number">320,<span class="hljs-number">44)]; [<span class="hljs-keyword">Self<span class="hljs-variable">. View addsubview:toolbar];<span class="hljs-comment">Create a text caption Uibarbuttonitem<span class="hljs-built_in">Uibarbuttonitem * BN1 = [[<span class="hljs-built_in">Uibarbuttonitem alloc] initwithtitle:<span class="hljs-string">@ "ok" Style:uibarbuttonitemstyleplain target:<span class="hljs-keyword">Self action:<span class="hljs-keyword">@selector (clicked:)];<span class="hljs-comment">Create a uibarbuttonitem that uses a custom picture<span class="hljs-built_in">Uibarbuttonitem * BN2 = [[<span class="hljs-built_in">Uibarbuttonitem alloc] initwithimage:[<span class="hljs-built_in">UIImage imagenamed:<span class="hljs-string">@ "lyf.jpg"] style:uibarbuttonitemstylebordered target:<span class="hljs-keyword">Self action:<span class="hljs-keyword">@selector (clicked:)];<span class="hljs-comment">Create a Uibarbuttonitem using the System icon<span class="hljs-built_in">Uibarbuttonitem * BN3 = [[<span class="hljs-built_in">Uibarbuttonitem alloc] Initwithbarbuttonsystemitem:uibarbuttonsystemitemadd target:<span class="hljs-keyword">Self action:<span class="hljs-keyword">@selector (clicked:)];<span class="hljs-comment">Create a scalable Uibarbuttonitem<span class="hljs-built_in">Uibarbuttonitem * Flexitem = [[<span class="hljs-built_in">Uibarbuttonitem alloc] Initwithbarbuttonsystemitem:uibarbuttonsystemitemflexiblespace target:<span class="hljs-literal">Nil Action:<span class="hljs-literal">nil]; Prog = [[uiprogressview alloc] initwithprogressviewstyle:uiprogressviewstylebar]; Prog<span class="hljs-variable">. frame = CGRectMake (<span class="hljs-number">0,<span class="hljs-number">0,<span class="hljs-number">80,<span class="hljs-number">20); Prog<span class="hljs-variable">. Progress =<span class="hljs-number">0;<span class="hljs-built_in">Uibarbuttonitem * Bn4 = [[<span class="hljs-built_in">Uibarbuttonitem alloc] initwithcustomview:prog]; Toolbar<span class="hljs-variable">. Items = [<span class="hljs-built_in">Nsarray arraywithobjects:bn1,bn2,bn3,flexitem,bn4,<span class="hljs-literal"><span class="hljs-literal">nil]; Tbtimer = [nstimer scheduledtimerwithtimeinterval:<span class="hljs-number">0.2 target: self<span class="hljs-keyword">selector:<span class="hljs-keyword">@selector (changeprogress) UserInfo:<span class="hljs-literal">Nil repeats:<span class="hljs-literal">YES];} -(<span class="hljs-keyword">void) clicked: (<span class="hljs-keyword">id) sender{ <span class="hljs-built_in">NSLog (<span class="hljs-string">@ "%@", sender);} -(<span class="hljs-keyword">void) changeprogress{ <span class="hljs-keyword">if (prog<span class="hljs-variable">. Progress >=<span class="hljs-number">1.0) {[tbtimer invalidate];} <span class="hljs-keyword">else {[prog Setprogress:prog<span class="hljs-variable">. Progress + <span class="hljs-number">0.05 animated:<span class="hljs-literal">YES];}}</span> </span> </span> </span> </span> </span> </span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></code></pre><p><p>IOS UI Controls 6</p></p></span>
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service