E-COM-NET
首页
在线工具
Layui镜像站
SUI文档
联系我们
推荐频道
Java
PHP
C++
C
C#
Python
Ruby
go语言
Scala
Servlet
Vue
MySQL
NoSQL
Redis
CSS
Oracle
SQL Server
DB2
HBase
Http
HTML5
Spring
Ajax
Jquery
JavaScript
Json
XML
NodeJs
mybatis
Hibernate
算法
设计模式
shell
数据结构
大数据
JS
消息中间件
正则表达式
Tomcat
SQL
Nginx
Shiro
Maven
Linux
nsbundle
WKWebView 加载本地 CSS 样式
htmlappendString:@""];[htmlappendFormat:@""];[htmlappendString:@"测试文案"];NSURL*myUrl=[NSURLfileURLWithPath:[
NSBundle
ma
ADreamClusive
·
2023-09-22 19:56
iOS 用photokit读取metaData 数据变少的问题
ALAsset读取metaData的文章一搜一大把,photokit也有不少,但是,没有一篇文章提到数据缺失的问题NSURL*fileUrl=[[
NSBundle
mainBundle]URLForResource
64e627e6c487
·
2023-09-21 04:54
音视频资源保存与本地获取
SaveToCamera-(void)saveAction{NSMutableArray*video=[NSMutableArrayarrayWithCapacity:3];NSArray*moves=[[
NSBundle
mainBundle
萧修
·
2023-09-18 00:55
Objective-C NSString 与 C++ string 之间的转换
1.NSStringtostringNSString*p_str=[[
NSBundle
mainBundle]pathForResource:@"test"ofType:@"png"inDirectory
zxcasd11
·
2023-09-17 08:12
C/C++
Objective-C
c++
objective-c
CocoaPods使用Bundle的注意点
我在写CHDatePickerView框架的时候用到了Bundle来存放本地化语言.并且我使用了的普通方式[
NSBundle
mainBundle]获取Bundle路径.问题1.获取到的Bundle为nil
MeteoriteMan
·
2023-09-17 08:59
CocoaPods
oc UITableView 2 解析数组(还没消化)
plist解析//加载字典数组NSArray*dictArray=[NSArrayarrayWithContentsOfFile:[[
NSBundle
mainBundle]pathForResource
weixin_38107457
·
2023-09-17 05:49
oc
ios
Xcode9 MobileCoreServices.framework
Lazyloading
NSBundle
MobileCoreServices.framework,[MC]LoadedMobileCoreServices.framework,stackoverflow1stackoverflow2Lazyloading
NSBundle
MobileCoreServices.framework
学游泳的小黑
·
2023-09-17 00:52
使用bundle打包图片资源和xib
2.1、加载本地的bundle+(
NSBundle
*)bundle{static
NSBundle
*bundle=nil;staticdispatch_once_tonceToken;dispatch_once
zhouluyao
·
2023-09-14 14:10
在IOS中如何读取系统产生的plist文件和自定义的plist文件
//读取自定义的plist文件的写法NSString*plistPath=[[
NSBundle
mainBundle]pathForResource:@"customInfo"ofType:@"plist
大漠赏花
·
2023-09-13 23:17
IOS加载plist文件、懒加载与数据模型相关
-(IBAction)loadPlistBtn:(id)sender{//获取bundle
NSBundle
*bundle=[
NSBundle
mainBundle];//获取plist地址NSString
KevenT
·
2023-09-08 11:49
ios 本地html添加拼接参数
image.pngNSString*htmlStr=@"http://www.xiaodianying.mp4";NSString*filePath=[[
NSBundle
mainBundle]pathForResource
一个七
·
2023-09-06 17:33
ios 获取自定义bundle资源小结
里面创建一个文件夹,修改其后缀为.bundleSnip20171121_1.pngSnip20171121_2.png2、直接Xcode创建二、注意以上两种访问资源有坑访问资源代码:NSString*path=[[[
NSBundle
mainBundle
baby_在海边
·
2023-09-05 06:20
iOS 分别用系统、媒体音量播放短音频、音效
#import//用系统音量播放SystemSoundIDsoundID;//加载文件NSURL*fileURL=[NSURLfileURLWithPath:[[
NSBundle
mainBundle]pathForResource
JohnayXiao
·
2023-09-01 07:53
View从Xib初始化流程
通过代码从xib读取ViewDateBoardView*view=[[
NSBundle
mainBundle]loadNibNamed:NSStringFromClass(self)owner:niloptions
HQQ_哈球球
·
2023-09-01 05:58
iOS开发:简单到爆炸的背景音乐播放器-AVPlayer
#pragmamark-新建播放器-(void)createPlayerWithMusicName:(NSString*)musicName{//资源的URL地址NSURL*url=[[
NSBundle
mainBundle
流浪的诗意
·
2023-09-01 02:48
H264 AAC G711 封装成MP4
利用iOS的AVAssetWritter2.FFmpeg3.MP4V2本文使用第三种:本地h264和aac封装成MP4:1.读取h264和aac文件的数据NSString*h264FilePath=[[
NSBundle
mainBundle
BigBowen
·
2023-08-31 00:17
iOS 获取 xcassets 中的图片(App icon和启动页)
所以这时如果我们使用的是xcassets来设置Logo图片(Appicon)和启动页图片的话,我们在程序中就可以直接使用:获取Logo(Appicon)NSDictionary*infoPlist=[[
NSBundle
mainBundle
熊梓君
·
2023-08-28 14:30
iOS 音乐播放器不播放问题
不论是系统自带的播放器,还是第三方,都会出现:需求很简单,要求播放器播放一段音频文件,先展示错误代码-(void)viewDidLoad{[superviewDidLoad];NSString*str=[[
NSBundle
mainBundle
高射火炮
·
2023-08-27 14:49
UIImage
NSString*name=@"loading.gif";NSString*filePath=[[
NSBundle
bundleWithPath:[[
NSBundle
mainBundle]bundlePath
番茄红豆汤
·
2023-08-23 17:03
有参数的NSLocalizedString
NSLocalizedString的定义:#defineNSLocalizedString(key,comment)\[[
NSBundle
mainBundle]localizedStringForKey
猫大人H
·
2023-08-21 05:59
iOS获取当前app的名称和版本号
iOS获取当前app的名称和版本号NSDictionary*infoDictionary=[[
NSBundle
mainBundle]infoDictionary];//获取app版本信息NSLog(@"
ly_chee_
·
2023-08-15 20:41
Open In功能的坑
为了测试OpenIn功能,在项目目录中添加了一个PDF文档(statement.pdf),可以通过如下代码获取文件路径:NSURL*statementURL=[NSURLfileURLWithPath:[[
NSBundle
mainBundle
ThaiLanKing
·
2023-08-13 07:59
iOS 加载本地的html
NSURL*url1=[[
NSBundle
mainBundle]URLForResource:@"privacyPolicy"withExtension:@"html"];[self.wkWVloadRequest
aofeilin
·
2023-08-10 15:00
IPHONEX显示状态栏
_PrefersStatusBarHiddenInited){NSNumber*hidden=[[[
NSBundle
mainBundle]infoDic
Foo_d488
·
2023-08-08 11:38
flutter开发实战-实现音效soundpool播放音频及控制播放暂停停止设置音量
音效类似iOS中的Sound在iOS中使用sound来播放mp3音频示例如下//通过通知的Sound设置为voip_call.caf,这里播放一段空白音频,音频结束后结束震动NSString*path=[[
NSBundle
BruceGerGer
·
2023-08-06 05:14
移动开发
flutter开发实战
flutter
flutter
音视频
soundpool
exoplayer
sound
音频播放
音效
ios 保存本地数据的方法。
NSString*path=[[
NSBundle
mainBundle]pathForResource:@"文件名"ofType:@"plist"];//文件数据类型是arrayNSArray*array
lmyuanhang
·
2023-08-03 23:03
iOS
https ssl加密
AFNetworking单向校验证书+(AFSecurityPolicy*)customPrivateSecurityPolicy{//先导入证书NSString*cerPath=[[
NSBundle
mainBundle
小七霏雨
·
2023-07-26 01:46
iOS - 两种方法删除NSUserDefaults所有记录
方法一NSString*appDomain=[[
NSBundle
mainBundle]bundleIdentifier];[[NSUserDefaultsstandardUserDefaults]removePersistentDomainForName
小驴拉磨
·
2023-07-25 08:30
iOS数据存储的几种方式【plist、序列化/反序列化、sqlite3、FMDB】
文章目录沙盒DocumentsLibrarytmpNSFileManager
NSBundle
NSUserDefaults归档解档sqlite3数据存储数据存储本质就是运行时的对象保存在文件、数据库中。
草帽-小子
·
2023-07-25 04:07
iOS
iOS
sqlite
FMDB
沙盒
mac 中启动另外一个程序并且将该窗口置于最前面
-(void)launchSoftWithBundleID:(NSString*)softPath{
NSBundle
*softBundle=[
NSBundle
bundleWithPath:softPath
Johnny Tong
·
2023-07-24 16:12
Mac
OS
mac
自定义的view添加xib文件的坑(this class is not key value coding-compliant for the key)
1image.png2image.png选择第二个3加载代码whfView*wf=[[[
NSBundle
mainBundle]loadNibNamed:@"whfView"owner:selfoptions
统领三界
·
2023-07-21 06:28
UI day 6 UIImageView UIImage图片类 UISitch开关控件 UIStepper加减控件 U UISegmentedControl 分段控制器
初始化UIImage对象,及为其加载图片有两种方式:方式一:UIImage*image=[UIImageimageNamed:@"1.JPG"];方式二:通过图片的路径加载图片,通过应用程序包找出图片
NSBundle
张乾坤
·
2023-07-21 01:42
UI基础
UI
URLsForResourcesWithExtension
NSArray*videoUrls=[[
NSBundle
mainBundle]URLsForResourcesWithExtension:@".mp4"subdirectory:nil];使用URLsForResourcesWithExtension
鞋底没纹易摔跤
·
2023-07-20 23:28
iOS 获取项目相关信息(名称,版本号等)
NSDictionary*appInfoDic=[[
NSBundle
mainBundle]infoDictionary];App的大部分设置信息都在appInfoDic里面了,例如要获取app名称,直接就
AnderQZ
·
2023-07-19 10:06
Xcode11 Could not find a storyboard named 'MainStoryBoard' in bundle
NSBundle
xcode11新建项目及配置在xcode11中新建项目默认使用ios13SDK创建,会直接将APP生命周期从APPdelegate转交给SceneDelegate项目文件结构如下├──yourProject//项目文件│├──yourProject//源码文件夹││├──AppDelegate.swift││├──SceneDelegate.swift││├──ViewController.swi
爱读书的强强
·
2023-07-18 04:04
ios 通过xib自定义控件
interfaceBuilder工具来编辑本质都是转换成代码去创建控件不同点:xib是轻量级的,用来描述局部ui界面创建模型文件XMGCar自定义控件xib图形设计xib的加载方法1(最常用)NSArray*views=[[
NSBundle
mainBundle
weixin_38107457
·
2023-07-17 08:33
oc
ios
cocoa
macos
【OC】 将CSV文件加载到字典(NSMutableDictionary)
下面的代码用来从CSV读取文件并存储到字典中:-(id)addCsvFileToDictionary{NSString*filepath=[[
NSBundle
mainBundle]pathForResource
三岁牧羊
·
2023-07-13 17:44
Objective-C
MacOS开发
objective-c
macos
通过下载链接检测版本更新
-(void)GetUpdate{NSDictionary*infoDict=[[
NSBundle
mainBundle]infoDictionary];NSString*nowVersion=[infoDictobjectForKey
Niklaus_8871
·
2023-06-23 14:56
通过Xib获取的View的frame修正
BaseTableViewHeaderView*baseHeaderView=[[[
NSBundle
mainBundle]loadNibNamed:@"BaseTableViewHeaderView"owner
Qing学
·
2023-06-20 19:36
使用AFNetworking来支持HTTPS遇到的坑
不说了,直接上原来的代码-(AFSecurityPolicy*)customSecurityPolicy{NSString*cerPath=[[
NSBundle
m
贾小敏1234
·
2023-06-18 20:37
iOS App版本号比对
NSOrderedDescending1输入版本号小于app版本号-(NSComparisonResult)compare:(NSString*)version{//当前版本NSDictionary*infoDictionary=[[
NSBundle
ma
尕歪Tia
·
2023-06-12 20:04
iOS从文件读取字符串,无分隔符分割成数组
NSString*files=[[
NSBundle
bundleWithPath:_bundlePath]pathForResource:@"cn_1.1"ofType:@"txt"];NSString*
谭谭谭思密达
·
2023-06-10 15:55
iOS 使用本地Json文件及遇到的问题
//获取文件路径(1)NSString*path=[[[
NSBundle
mainBundle]resourcePath]stringByAppendingPathComponent:@"HomeData.json
_蓝星
·
2023-06-10 02:22
iOS - framework开发资源图片如何配置
这里总结一下:通过.bundle文件存储(.bundle可存储xib等其他文件),此时如果在项目中使用到我们的framework时,需要把这里的.bundle文件添加到项目中,这时我们可以用以下代码去加载:
NSBundle
温柔vs先生
·
2023-06-09 15:28
iOS按钮菜单
demo地址CarouselMenuView*view=[[[
NSBundle
mainBundle]loadNibNamed:@"CarouselMenuView"owner:selfoptions:nil
奔跑的兔崽子
·
2023-04-21 04:55
AVPlay播放视频
@property(nonatomic,retain,nullable)AVPlayer*player;NSString*urlStr=[[
NSBundle
mainBundle]pathForResource
AsiaSun.
·
2023-04-18 01:03
iOS
读取
NSBundle
下自己新建的文件夹下面的所有文件
NSArray*array=[[
NSBundle
mainBundle]pathsForResourcesOfType:@"jpg"inDirectory:@"image"];NSLog(@"array:
wangDavid939i
·
2023-04-11 06:56
InjectionIII使用方法(极速调试)
1、macAppStore下载InjectionIII2、didFinishLaunchingWithOptions加入以下代码#ifDEBUG//iOS[[
NSBundle
bundleWithPath
码农淏
·
2023-04-10 18:46
krpano 720云 WKWebView加载本地html
今天看到了苹果禁止了UIWebView,就试试WKWebView首先加到项目里的时候记得选择Createfolderreferences,就是变成蓝色文件夹之前UIWebView直接写的关键代码NSURL*url=[[
NSBundle
mainBundle
ZhangXiaoxx
·
2023-04-10 08:40
iOS:解决Could not find a storyboard named ‘LaunchScreen.storyboard‘ in bundle
NSBundle
打开项目的:HBuilder-uniPlugin-Info.plist删除Launchscreeninterfacefilebasename然后看图,清空掉之前的LaunchScreen.storyboard东西再运行就可以了,我也是改自定基座出的问题略
Wenlong Yang
·
2023-04-07 23:37
ios
objective-c
xcode
上一页
1
2
3
4
5
6
7
8
下一页
按字母分类:
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
T
U
V
W
X
Y
Z
其他