我想在iOS中的标签栏模拟下添加一个视图,然后用它后面的动画显示它.但是当我使用我的代码时,必须来自我的标签栏后面的视图会重叠我的标签栏一段时间.

这是我的代码:
- (void)handlePressedButton {
if (pressedButton.selected) {
[UIView beginAnimations:nil context:nil];
[UIView setAnimationDuration:0.5];
CGAffineTransform transform1 = CGAffineTransformMakeTranslation(-196.0, 0.0);
CGAffineTransform transform2 = CGAffineTransformMakeTranslation(0.0, 0.0);
[leftPanelView setTransform:transform1];
[movedView setTransform:transform2];
[UIView commitAnimations];
pressedButton.selected = NO;
}
else {
pressedButton.selected = YES;
if (leftPanelView) {
[leftPanelView removeFromSuperview];
leftPanelView = nil;
}
CGRect viewFrame = CGRectMake(-196, 0, 236, 748);
leftPanelView = [[UIView alloc] initWithFrame:viewFrame];
leftPanelView.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"left-nav-content.png"]];
// Code to populate leftPanelView according to what button is pressed.
[self populateLeftPanelView];
[UIView beginAnimations:nil context:nil]; …Run Code Online (Sandbox Code Playgroud) 我想通过Mac OS X终端向服务器发送IMAP命令并获得响应.我可以使用以下行连接到服务器:
openssl s_client -connect imap.gmail.com:993
Run Code Online (Sandbox Code Playgroud)
我可以成功登录:
? LOGIN m.client2 passwordhere
Run Code Online (Sandbox Code Playgroud)
但是所有其他命令都不起作用,没有来自服务器的响应.我试过这个:
? LIST "" "*"
? SELECT INBOX
Run Code Online (Sandbox Code Playgroud) 我想从URL获取音频流并在iPhone上播放.不幸的是,只有C#示例如何播放该流,但我需要在iPhone框架中实现Objective C.我试过自己使用不同的音频框架,但都没有成功.这就是C#中的内容:
response = httpWebRequest.GetResponse();
using (Stream stream = response.GetResponseStream())
{
using (SoundPlayer player = new SoundPlayer(stream))
{
player.PlaySync();
}
}
Run Code Online (Sandbox Code Playgroud)
我应该在目标C中做什么来从该网址获取流音频?在那个URL我没有mp3文件或其他东西,我只是得到一个流.可能我必须以某种方式将该流下载到iPhone音频文件,然后播放它以摆脱滞后.
我试过这个:
AVPlayer *player = [AVPlayer playerWithURL:url];
[player play];
Run Code Online (Sandbox Code Playgroud)
还有这个:
AVAudioPlayer *theAudio = [[AVAudioPlayer alloc] initWithContentsOfURL: url error:nil];
[theAudio setVolume :0.50]; //setting the volume
[theAudio play];
Run Code Online (Sandbox Code Playgroud)
都没有奏效.我测试了我的网址,它在浏览器中运行良好.
这是有效的代码:
NSData *_objectData = [NSData dataWithContentsOfURL:url];
NSError *error;
AVAudioPlayer *audioPlayer = [[AVAudioPlayer alloc] initWithData:_objectData error:&error];
audioPlayer.numberOfLoops = 0;
audioPlayer.volume = 1.0f;
[audioPlayer prepareToPlay];
if (audioPlayer == nil)
NSLog(@"%@", [error description]);
else
[audioPlayer …Run Code Online (Sandbox Code Playgroud) 是否允许在iPhone应用中加载自己的广告?我的意思是,我想定期将一些广告图片从互联网加载到应用程序,而我的用户在不使用iAds网络的情况下使用它.是苹果允许的吗?我已阅读AppStore Review Guidelines,如果该应用不仅适用于广告,则不会发现任何限制.
我想在 Android 模拟器的 Android 应用程序的文本字段中输入俄语内容。我怎样才能做到这一点?默认情况下我只能输入英文。我尝试在设置中设置俄语键盘,但这没有帮助。我想,对于其他语言来说也是一样的。当我更改 MacBook 上的键盘布局并尝试使用 MacBook 键盘打字时,我只能输入英文字母。浏览器也是如此,当我尝试在 Google 搜索字段中输入某些内容时 - 我无法找到如何输入俄语。

我有一个项目,它有一个静态库,引用头文件,如下所示:
#import <libetpan/libetpan.h>
Run Code Online (Sandbox Code Playgroud)
我无法更改此导入行.我该怎么办,让Xcode找到那些头文件?我有一个带头文件的文件夹,我可以导入到项目中.谢谢.
目前错误如下:
'libetpan/libetpan.h' file not found
Run Code Online (Sandbox Code Playgroud) 我正在使用PPRevealSideViewController.我有两个ViewControllers.中间的一个是SideSwipeTableViewController的子类,左边的是UIViewController的子类,里面有一个tableView.PPRevealSideViewController和SideSwipeTableViewController的示例应用程序都支持UITableView的scrollsToTop属性,至少对于PPRevealSideViewController中间的TableView而言.但是当我使用这两个类时,scrollsToTop停止工作.
我知道这是类似的问题,但我已经尝试了一切,我已阅读所有帖子,谷歌给了我这个问题,但仍然无法解决它.所以我决定在这里问一下,即使做什么也没有任何想法,让scrollsToTop工作.
self.window.rootViewController = self.revealSideViewController;
Run Code Online (Sandbox Code Playgroud)
哪里
- (PPRevealSideViewController *)revealSideViewController
{
if (! _revealSideViewController) {
_middleTableViewController = [MiddleTableViewController new];
UINavigationController *middleNavController = [[UINavigationController alloc] initWithRootViewController:_middleTableViewController];
_revealSideViewController = [[PPRevealSideViewController alloc] initWithRootViewController:middleNavController];
_revealSideViewController.delegate = self;
}
return _revealSideViewController;
}
- (void) preloadSidePanel
{
AppDel.systemTableViewController = [SystemTableViewController new];
AppDel.systemTableViewController.parent = self;
[self.revealSideViewController preloadViewController:AppDel.systemTableViewController
forSide:isLeftHanded ? PPRevealSideDirectionLeft : PPRevealSideDirectionRight
withOffset:_offset];
}
Run Code Online (Sandbox Code Playgroud)
我在这个systemTableViewController中设置了这个:
_tableView = [[UITableView alloc] initWithFrame:frame style:UITableViewStylePlain];
[self.view addSubview:_tableView];
_tableView.scrollsToTop = NO;
Run Code Online (Sandbox Code Playgroud)
但是,它没有帮助.
我试图在Bash中创建一个变量来快速访问某些文件夹并将其保存到我的bash_profile脚本文件中.这就是脚本的样子
Documents=~/Documents
Apps=~/Library/Application\ Support/iPhone\ Simulator/5.1/Applications
Run Code Online (Sandbox Code Playgroud)
运行脚本后,$ Documents变量有效,而$ Apps则无效.它说:
-bash: cd: /Users/myusername/Library/Application: No such file or directory
Run Code Online (Sandbox Code Playgroud)
这是文件夹的路径:
/Users/myusername/Library/Application Support/iPhone Simulator/5.1/Applications
Run Code Online (Sandbox Code Playgroud)
我应该如何逃离空间?我使用Vim并输入"cd $ Apps".
我正在尝试将60x60像素分配给tabBarItem.image:
self.tabBarItem.image = [UIImage imageNamed:@"tab_settings@2x.png"];
Run Code Online (Sandbox Code Playgroud)
我在HIG上读到,我应该为Retina显示器放置60x60像素图像.但我得到的是尺寸不正确的图像:

如果我把它设为30x30px,它看起来也很糟糕(不像Retina).
我试图通过隐藏UINavigationBar和UIStatusBar来全屏显示View(UIBubbleTable实例位于View控制器视图的顶部).但由于某种原因,黑色空间仍位于顶部:
NSLog(@"view frame before:%@", NSStringFromCGRect(self.view.frame));
NSLog(@"view bounds before:%@", NSStringFromCGRect(self.view.bounds));
NSLog(@"bubble table frame before:%@", NSStringFromCGRect(self.bubbleTable.frame));
NSLog(@"bubble table bounds before:%@", NSStringFromCGRect(self.bubbleTable.bounds));
[self.view hideKeyboard];
[[UIApplication sharedApplication] setStatusBarHidden:YES];
self.navigationController.navigationBar.hidden = YES;
self.containerView.hidden = YES;
[self.view setFrame:[[UIScreen mainScreen] bounds]];
[self.bubbleTable setFrame:self.view.bounds];
NSLog(@"view frame after:%@", NSStringFromCGRect(self.view.frame));
NSLog(@"view bounds after:%@", NSStringFromCGRect(self.view.bounds));
NSLog(@"bubble table frame after:%@", NSStringFromCGRect(self.bubbleTable.frame));
NSLog(@"bubble table bounds after:%@", NSStringFromCGRect(self.bubbleTable.bounds));
Run Code Online (Sandbox Code Playgroud)
NSLog的:
2013-07-06 22:05:18.068 KIM[5085:c07] view frame before:{{0, 0}, {320, 504}}
2013-07-06 22:05:18.068 KIM[5085:c07] view bounds before:{{0, 0}, {320, 504}}
2013-07-06 22:05:18.069 KIM[5085:c07] bubble table frame before:{{0, …Run Code Online (Sandbox Code Playgroud) ios ×7
iphone ×5
objective-c ×2
terminal ×2
uitableview ×2
android ×1
audio ×1
bash ×1
fullscreen ×1
imap ×1
ipad ×1
itunes-store ×1
macos ×1
openssl ×1
uiscrollview ×1
uitabbaritem ×1
uiview ×1
view ×1
xcode4 ×1