所以我有这个代码应该更改导航栏标题字体,但它是doenst
NSDictionary *attributes = [NSDictionary dictionaryWithObjectsAndKeys:[UIFont
fontWithName:_dataManager.optionsSettings.fontString size:14], NSFontAttributeName,
[UIColor whiteColor], NSForegroundColorAttributeName, nil];
[[UINavigationBar appearance] setTitleTextAttributes:attributes];
Run Code Online (Sandbox Code Playgroud)
使用此代码更改后退按钮字体可以正常工作.
//set backbutton font
NSDictionary *normalAttributes = [NSDictionary dictionaryWithObjectsAndKeys:
[UIFont fontWithName:_dataManager.optionsSettings.fontString size:15], NSFontAttributeName,
nil];
[[UIBarButtonItem appearance] setTitleTextAttributes:normalAttributes
forState:UIControlStateNormal];
Run Code Online (Sandbox Code Playgroud) 我可以在播放新声音时播放背景音频.但是我无法再次将背景音频级别恢复到最大值.当我的代表试图"解开"它只是一直被躲避.对此的正常修复是AudiosessionSetProperty,但在iOS 7中已弃用,Apple未在弃用警告或文档中提供任何提示.
我在加载视图时调用此方法.
- (void) configureAVAudioSession
{
//get your app's audioSession singleton object
AVAudioSession* session = [AVAudioSession sharedInstance];
//error handling
BOOL success;
NSError* error;
success=[session setCategory:AVAudioSessionCategoryPlayback
withOptions:AVAudioSessionCategoryOptionMixWithOthers error:&error];
if (!success)
{
NSLog(@"AVAudioSession error :%@",error);
}
else
{
}
success = [session setActive:YES error:&error];
if (!success) {
NSLog(@"Error setting active %@",error);
}
else
{
NSLog(@"succes settings active");
}
}
Run Code Online (Sandbox Code Playgroud)
这是我播放音频的时候
-(void)playTimeOnGo
{
NSURL *url = [NSURL fileURLWithPath:[[NSBundle mainBundle]
pathForResource:@"just-like-magic"
ofType:@"mp3"]];
self.audioPlayer = [[AVAudioPlayer alloc]
initWithContentsOfURL:url
error:nil];
self.audioPlayer.delegate=(id<AVAudioPlayerDelegate>)self;
//get your app's audioSession …Run Code Online (Sandbox Code Playgroud) 我试图删除我的xcode iOS项目中的状态栏.phonegap 2.5版.我尝试了以下内容.
1)通过将以下行添加到config.xml来从phonegap特定项目中删除状态栏
<preference name="fullscreen" value="true" />
Run Code Online (Sandbox Code Playgroud)
这是我的xml文件.
<?xml version="1.0" encoding="UTF-8"?>
<widget>
<preference name="KeyboardDisplayRequiresUserAction" value="true" />
<preference name="SuppressesIncrementalRendering" value="false" />
<preference name="UIWebViewBounce" value="false" />
<preference name="TopActivityIndicator" value="gray" />
<preference name="EnableLocation" value="false" />
<preference name="EnableViewportScale" value="true" />
<preference name="AutoHideSplashScreen" value="true" />
<preference name="ShowSplashScreenSpinner" value="false" />
<preference name="FadeSplashScreen" value="true" />
<preference name="FadeSplashScreenDuration" value=".25" />
<preference name="MediaPlaybackRequiresUserAction" value="false" />
<preference name="AllowInlineMediaPlayback" value="false" />
<preference name="BackupWebStorage" value="cloud" />
<preference name="fullscreen" value="true" />
<content src="index.html" />
<plugins>
<plugin name="Device" value="CDVDevice" />
<plugin name="Logger" value="CDVLogger" …Run Code Online (Sandbox Code Playgroud) 是否可以使用Cordova相机API拍摄照片,然后将其本地存储在iOS和Android的相机胶卷中?我知道它可能,但它是否以某种方式涉及本机代码,还是可以用纯HTML完成?文档没有说明这一点.
cordova ×2
ios ×2
ios7 ×2
audiosession ×1
background ×1
camera ×1
deprecated ×1
fonts ×1
hide ×1
save ×1
statusbar ×1
xcode ×1