IOS Integrated Technology

Source: Internet
Author: User

1. Hide the status bar [[uiapplication sharedapplication] setstatusbarhidden: Yes animated: No];

2. Open the mobile album

First, introduce the uiimagepickercontrollerdelegate protocol.

Uiimagepickercontroller * imgpickercontroller = [[uiimagepickercontrolleralloc] init];

Imgpickercontroller. Delegate = self;

Imgpickercontroller. sourcetype = uiimagepickercontrollersourcetypephotolibrary;

[Selfpresentviewcontroller: Self. imgpickercontrolleranimated: yescompletion: Nil];

3. Identify and display the running device type

Nsstring * devicetype = [uidevicecurrentdevice]. model;

Nslog (@ "current device type: % @", devicetype );

4. Number on the tabbar Image

Self. tabbaritem. badgevalue = [nsstringstringwithformat: @ "% d", 9];

5. Remove the lines between cells from tableview.

Mytableview. separatorstyle = uitableviewcellseparatorstylenone;

6. Load local file PDF

Nsurl * url = [[nsbundle mainbundle] urlforresource: @ "sample" withextension: @ "pdf"];

7.

Uitapgesturerecognizer * singletap = [[uitapgesturerecognizeralloc] initwithtarget: selfaction: @ selector (btnimageview :)];

[Self. imageviewaddgesturerecognizer: singletap];

-(Void) btnimageview :( ID) sender {

Cabasicanimation * Shake = [cabasicanimationanimationwithkeypath: @ "transform. Rotation. Z"];

// Set the jitter Amplitude

Shake. fromvalue = [nsnumbernumberwithfloat:-0.1];

Shake. tovalue = [nsnumbernumberwithfloat: + 0.1];

Shake. Duration = 0.1;

Shake. autoreverses = yes; // whether it is repeated

Shake. repeatcount = 4;

[Self. imageview. layeraddanimation: shakeforkey: @ "imageview"];

Self. imageview. Alpha = 1.0;

[Uiviewanimatewithduration: 2.0 delay: 2.0 options: uiviewanimationoptioncurveeaseinanimations: nilcompletion: Nil];

}

8.

// Set the background of uitableview to transparent

Table. backgroundview = nil;

Table. backgroundcolor = [uicolor clearcolor];

Table. opaque = no;

9.

To display a uiview at the beginning, you only need to call the bringsubviewtofront () method of its parent view.

To push a uiview layer to the backend, you only need to call the sendsubviewtoback () method of its parent view.












Related Article

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.