In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-15 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
How to understand the encapsulation .a static library, I believe that many inexperienced people do not know what to do. Therefore, this paper summarizes the causes and solutions of the problem. Through this article, I hope you can solve this problem.
Encapsulate .a static library
To create a bundle, you only need to put the image resources in a folder such as p_w_picpathSource and change the suffix to .bundle.
Use resource pictures
$NSBundle * p_w_picpathSourceBundle = [NSBundle bundleWithPath: [[NSBundle mainBundle] pathForResource:@ "p_w_picpathSource" ofType:@ "bundle"]]
Splicing path
$if (retainFllow5) {/ / judge how many times to load p_w_picpathSuffix = [NSString stringWithFormat:@ "% dumped 2x", n];} else {p_w_picpathSuffix = [NSString stringWithFormat:@ "% dashed 3x", n];} $NSString * mosaic = [NSString stringWithFormat:@ "% @% @", p_w_picpathPrefix, p_w_picpathSuffix]; $NSString * p_w_picpathSource = [p_w_picpathSourceBundle pathForResource:mosaic ofType:@ "png"]
What you get here is the picture resources you need.
$[UIImage p_w_picpathWithContentsOfFile:p_w_picpathSource]
Add the required header files to the publicGroup
It is claimed that the .a files of release and debug are convenient for debugging and real machine use to merge the two versions.
$lipo-create / Users/chenwei/Desktop/XXX/debug/libPeopleKeybord.a / Users/chenwei/Desktop/XXX/release/libPeopleKeybord.a-output / Users/chenwei/Desktop/XXX/libPeopleKeybord.a
If you take a look, you will find that 1 is lipo-create. The later Path 2 is 1.an empty Path 3-the Path after output is the merged .a library you need.
Put .an and bundle into the same project file at the same time. The image resources needed by a will go to the .bundle to find it.
After reading the above, have you mastered how to understand how to encapsulate .a static libraries? If you want to learn more skills or want to know more about it, you are welcome to follow the industry information channel, thank you for reading!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.