IPhone DevelopmentNote is the content to be introduced in this article.Iphone DevelopmentThe implementation of several cases in the above section.
1. About KMapView custom calloutM in IOS development
When I was doing a map application on ios, I sometimes needed to customize callout. After searching for a long time, I found an article on a foreign website about custom callout: bytes.
In fact, the custom callout is actually implemented through two annotations. If we place A on the map, We can insert a B after selecting, the offset of B is just above A, which forms the callout effect.
It mainly involves two proxy methods for MAP implementation:
- mapView:didSelectAnnotationView:
- mapView:didDeselectAnnotationView:
Insert B in the first proxy method and remove B in the second method. Generally, the custom callout is implemented in this way. If you have time, write one by yourself ~~
2. iphone development uses macros to determine whether it is running in a simulator or a real machine
- #if TARGETIPHONE_SIMULATOR
-
- #endif
- #if !(TARGET_IPHONE_SIMULATOR)
- #endif
The code in 1 is compiled in the simulator. The code in 2 will be compiled in the real machine.
3. Summary of Nib files in iphone application development
ProfilingNibFile.
LoadNib file, We only get a copy of this nib file. Nib load Code will instantiate objects, configure them, and establish the connection you have established in IB.
Interface object: including visible and invisible. Generally, Some view windows are visible. Some view controllers are invisible.
The most important object of a nib file is the Files owner object. Unlike others, the Files owner object is a proxy object, which is not created when nib file is loaded. On the contrary, this object is created in code, and pass it to the nib load Code. This object is important because it connects the application code to the content of nib file.
Frist Responder is a proxy object that represents the first object of the application's dynamic corresponding link. Because the corresponding link of an application cannot be determined during design. When loading from a nib file to the memory, I can't do anything for First Responder. AppKit and UIKit frameworks automatically sets and manages the first responder according to the current configuration of the application.
4. iphone development-obtain image resources of other ipa programs and extract png resources from ipa)
In our development process, sometimes we may feel that some of the image resources written by others are relatively good and we want to use them. However, when we extract ipa, we cannot view png resources, because apple will store the png resources in a special format before packaging ipa, if you want to view the png Image of ipa, You need to convert it, for more information, see iPhone PNG Images Normalizer Python. This article only describes the method and uses a python conversion script.
Use ipin. copy the py script to the decompressed ipa Program directory, and switch to the decompressed ipa Program directory from the command line to run python ipin. py, so that the png will be converted to the normal png format, you can see.
Python script: http://u.115.com/file/aq2hi65i
Summary:IPhone DevelopmentThe content of the memo learning notes has been introduced. I hope this article will help you!