XcodeThe Study Case note is the content to be introduced in this article. It mainly introducesXcode3.2.5 help solve and use problems that cannot be displayedUIWebViewTo playVideoIn the iphone projectStatic Library.
Xcode 3.2.5 helps solve problems that cannot be displayed
In this version, Document must be installed online and automatically executed in the background.
However, the installation address is incorrect. This is a bug, which causes installation failure and cannot be viewed. The solution is to manually modify it. 1. Open the Term and log on to the root user. 2. Go
- /developer4.2/Platforms/iPhoneOS.platform/Developer/Documentation/DocSets/com.apple.adc.documentation.AppleiOS4_2.iOSLibrary.docset/Contents
Directory, modify the Info. plist file. Find/prerelease, delete it, save the disk, and restart Xcode.
Use UIWebView to play a video
MPMoviePlayerController is not inherited from UIViewController
The example in the SDK uses addSubviews to add MPMoviePlayerController. view.
InUIWebViewAnd then call [MPMoviePlayerController play.
Most convenient playbackVideoYou can use UIWebView to load an NSURL, that is, the video address. For example:
- self.webView = [[[UIWebView alloc] initWithFrame:[[UIScreen mainScreen] applicationFrame]] autorelease];
- NSURLRequest * request = [NSURLRequest requestWithURL:[NSURL URLWithString:string]];
- [self.webView loadRequest:request];
This effect is the standard player effect.
Static library in iphone Project
The iphone program in the AppStore cannot use dynamic link libraries.
If you need to provide some functions while hiding the code, you can use the static Link Library.
AddStatic LibraryMethod
Right-click target and choose add-> new target.
On the NewTarget page that appears, select Cocoa Touch-> Static Library to name the new library.
Add the source file to this database. You can drag the existing source file directly or right-click and choose add. Note: select the newly created database as the added target.
Set the original project to use the new library.
Right-click the target of the original project and select getInfo.
Select General Tab
Add the. a file to the newly created library in linked libraries ).
Compile the newStatic LibraryTo generate the. a file. Right-clickStatic LibraryTarget, select build)
Compile the original project. If you can call the method in the static library, it is added successfully.
How to hide static library code
You can directly Delete the source code from the static library and only submit the Linked Library file. a), so that the original project can still be compiled and executed.
Note:
The static link library file in Mac OS uses the. a extension as in linux.
Summary: The content of Xcode Study Case Notes has been introduced. I hope this article will help you!