15/10-16/6 Development Notes

Source: Internet
Author: User

Adding the same control multiple times to the parent control will eventually add only one of the controls

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

TableView set Backgroundview, Settings ImageView not come out?

Because Target is 7, only 8 of the images can be set.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

1.url encoding

When HTTP requests in iOS encounter Chinese characters, they need to be converted to UTF-8, using the following methods:

NSString * encodingstring = [urlstring stringbyaddingpercentescapesusingencoding:nsutf8stringencoding];

2.url decoding

After the request, the returned data, how to display the format:%3a%2f%2f, this time we need to do UTF-8 decoding, the method used is:

NSString *str = [Model.album_name stringbyreplacingpercentescapesusingencoding:nsutf8stringencoding];

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Datasourcearray and Reloaddata are all done in the main thread.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Assertion failure in-[uitableview _dequeuereusableviewoftype:withidentifier:],/buildroot/library/caches/ com.apple.xbs/sources/uikit_sim/uikit-3512.30.14/uitableview.m:6532

Resolution: Because the use of the Tableviewcell xib bound identifier, if the registration is not consistent with the Xib will be an error, or the code is wrong, carefully check the code.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

The following method with Ui_appearane_selector, can be set through appearance unified

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Iqkeyboardmanager

The keyboard is in the wrong order when switching TextField, which is related to the order of adding TextField controls, and the order can be resolved

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Get the controller that the child view resides in

-(Uiviewcontroller *) Viewcontroller

{

for (uiview* next = [self superview]; next; next = Next.superview) {

Uiresponder *nextresponder = [next Nextresponder];

if ([Nextresponder Iskindofclass:[uiviewcontroller class]]) {

Return (Uiviewcontroller *) Nextresponder;

}

}

return nil;

}

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

The This file is set to build for a version older than the project deployment target. Functionality May limited.

Workaround:

Select the Xib file and modify Project Deployment Target in Builds for

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Library not found ...

FIX:. A files are not uploaded to the server

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Libc++abi.dylib:terminate_handler unexpectedly threw an exception

2016.01.23

Encountered this situation, found that because I dragged the property from the Xib, I changed the name caused

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

APP Installation Failed

This application ' s application-identifier entitlement does does match that of the installed application. These values must match for a upgrade to be allowed.

Solve:

The iphone has an App with the same package identifier, which is deleted and then run.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Development Note:

If you build a class, for example: Ncqrcodeviewcontroller

Then you can't create a class like Ncqrcodeview (including xib), or it will crash because Ncqrcodeviewcontroller will go to ncqrcodeview.xib first, Nani! It's wrong here.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

iOS9 after the opening of Baidu, gold map needs the following configuration

Add a whitelist in Info.plist

<key>LSApplicationQueriesSchemes</key>

<array>

<string>baidumap</string>

<string>iosamap</string>

</array>

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Set the status bar style

1 Modify the Info.plist file to let UIApplication set the style

Add View controller-based status bar appearance and set to NO

2 Setting Styles

Application.statusbarstyle = Uistatusbarstylelightcontent in appdelegate;

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Provisioning profile is expiring warning

~/library/mobiledevice/provisioning profiles/

Remove all profiles in the re-download

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Directory not found for option '-l

Workaround:

Modify path: Select Project Name----->Targets----->Build Settings----->Search Paths-----> Library Search Paths

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

==15481==error:addresssanitizer:heap-buffer-overflow

Edit scheme...->run->diagnostics-> Cancel Enable Address Sanitizer

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Scale: Stretch picture

Aspect: Picture Length-width ratio, maintain the aspect ratio of the graph, keep the picture not deformed.

Aspect Fill: While maintaining the aspect ratio, scale the picture so that the picture fills the container.

Aspect Fit: While maintaining the aspect ratio, scale the picture so that the picture is fully displayed inside the container.

Scale to Fill: scales the picture so that the picture fills the container. Images may not be kept in a proportional, long-to-wide ratio, possibly stretching to deform.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Desktop Icon Notifications

Register push for IOS8 and IOS8 systems

if ([Application respondstoselector: @selector (registerusernotificationsettings:)]) {

Uiusernotificationsettings *settings = [uiusernotificationsettings settingsfortypes: (UIUserNotificationTypeBadge | Uiusernotificationtypesound | Uiusernotificationtypealert) Categories:nil];

[Application registerusernotificationsettings:settings];

}

Application.applicationiconbadgenumber = 1;

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

The identity used to sign the executable is no longer valid.

Steps:

    1. Open Xcode configuration (Xcode-Preferences ... )
    2. Select the Accounts page, select your Apple ID, point to the bottom right of the "view detail..." button
    3. Click the Refresh button in the lower left corner, wait for the refresh to complete, click the "done" button, close the Xcode configuration window
    4. Recompile the run project, if a repair window appears, "fix issue" button

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Provis file address of the device

/users/mashangyouqian/library/mobiledevice/provisioning Profiles

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

This application was modifying the AutoLayout engine from a background thread, which can leads to engine corruption and weir  D crashes. This would cause an exception in a future release

Just put the main thread that needs to update the UI.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

The identity used to sign the executable is no longer valid

Delete all files under ~/library/mobiledevice/provisioning profiles/, re-download

Download: Xcode->preference...->appleid->viewdetails->downloadall

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-(void) Viewwilldisappear: (BOOL) Animated {

[Super viewwilldisappear:animated];

Turn on system return gestures

if ([Self.navigationcontroller respondstoselector: @selector (Interactivepopgesturerecognizer)]) {

self.navigationController.interactivePopGestureRecognizer.enabled = YES;

}

}

-(void) Viewdidappear: (BOOL) Animated {

[Super viewdidappear:animated];

Disable system return gestures

if ([Self.navigationcontroller respondstoselector: @selector (Interactivepopgesturerecognizer)]) {

self.navigationController.interactivePopGestureRecognizer.enabled = NO;

}

}

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

#pragma mark-tap and Didselect conflict resolution

-(BOOL) Gesturerecognizer: (Uigesturerecognizer *) Gesturerecognizer Shouldreceivetouch: (Uitouch *) touch

{

if ([Nsstringfromclass ([Touch.view class]) isequaltostring:@ "Uitableviewcellcontentview"]) {

If no is returned, gesture recognizer ignores this touch event

return NO;

}

return YES;

}

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Cuicatalog:invalid Asset name supplied: (NULL)

Cause imagenamed is empty

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

iOS Project project, add a C file, compile error

Solution:

wrap up the #import with a package

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

SVN submits is out of date

Update

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Another way to slim the App is to submit bitcode to Apple instead of the final binary. Bitcode is the median of LLVM, and when the compiler updates, Apple can optimize it with the bitcode you submitted earlier, so you don't have to submit your app again after the compiler updates, and you'll enjoy the benefits of compiler improvements. Bitcode support is turned on by default in new projects, and you don't need to turn it off intentionally for no particular reason.

The PIP mode of the video app is relatively simple, and if you use Avplayerlayer to play the video, then nothing is supported. But if your previous choice is Mpmovieplayerviewcontroller, you may also need to migrate to the Avkit framework as soon as possible, because Media Player will be marked as deprecated in IOS 9 and no longer maintained.

Apps that swipe to overlay and split views use the Compact Width and Regular Height settings in the Size Class introduced by IOS 8, with AutoLayout for layout.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Notifications are sent only on the main thread.

Register in Init and log out of Dealloc.

Ghthouse is a good bug-tracking tool. OmniOutliner, I can find a bunch of things to do here.

If you crash, it's best to use the zombie zombies tool.

Real code quality is far more important than what others think of me.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

The operation couldn ' t be completed

Exit Xcode Restart

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Vvdocumenter-xcode Failure Problem Solving (if you can't do it, just delete it and start again OK)

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

APP Transport Security has blocked a cleartext HTTP (/HTTP) resource load since it is insecure. Temporary exceptions can be configured via your app ' s info.plist file.

Add in Info.plist

<key>NSAppTransportSecurity</key>

<dict>

<key>NSAllowsArbitraryLoads</key>

<true/>

</dict>

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Ios-is missing from working copy

Solution:

1. Open the terminal

2.cd to the folder prompted by the warning

3. Execute Command SVN RM--force The name of the missing file

4. Enter

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Bulk update of Xcode plugins

Find ~/library/application\ support/developer/shared/xcode/plug-ins-name info.plist-maxdepth 3 | xargs-i{} defaults write {} dvtplugincompatibilityuuids-array-add ' defaults read/applications/xcode.app/contents/ Info Dvtplugincompatibilityuuid '

15/10-16/6 Development Notes

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.