我YES在视图控制器的shouldAutorotateToInterfaceOrientation函数YES中返回,我可以看到正在返回的断点,但是willRotateToInterfaceOrientation没有调用该方法,也没有任何其他旋转方法.好像回来后YES没有任何事情发生!
有任何想法吗?
麦克风
我对MPMoviePlayerController感到有点古怪.
我正在尝试设置视频播放时的currentPlaybackTime(文件源).这是一个发生了什么的例子
a)播放状态= 5(MPMoviePlaybackStateSeekingBackward).currentPlaybackTime = 15.74(这是我按下按钮时的时间)
b)播放状态= 1(MPMoviePlaybackStatePlaying).currentPlaybackTime = 7.32
我尝试的东西似乎并不重要,并将currentPlaybackTime设置为最终为7.32.
一些额外的信息:即使使用MPMoviePlayerController上的内置控件,我也会遇到这种情况.例如,如果我向前滚动到15秒,它会跳回到7.32
有任何想法吗?它与媒体文件有关吗?
我正在尝试UIToolbar使用自定义图像创建一个带有5个按钮.我这样做的方法是创建类型的按钮UIButtonTypeCustom,然后UIBarButtonItems从这些按钮创建,然后将这些按钮添加到工具栏中setItems:animated:.但是,这会在图像之间添加空格,这会导致第5张图像从工具栏右侧的一半结束.我如何摆脱这些空间?我已经尝试了所有我能想到的东西.
非常感谢帮助.
这是一些关于我如何做到这一点的示例代码:
UIButton *button;
UIBarButtonItem *barButton1,*barButton2;
button = [UIButton buttonWithType:UIButtonTypeCustom];
[button setImage:[UIImage imageNamed:@"image1.png"] forState:UIControlStateNormal];
button.bounds = CGRectMake(0,0,button.imageView.image.size.width, button.imageView.image.size.height);
[button addTarget:self action:@selector(action:) forControlEvents:UIControlEventTouchUpInside];
barButton1 = [[UIBarButtonItem alloc] initWithCustomView:button];
button = [UIButton buttonWithType:UIButtonTypeCustom];
[button setImage:[UIImage imageNamed:@"bart_tb.png"] forState:UIControlStateNormal];
button.bounds = CGRectMake(0,0,button.imageView.image.size.width, button.imageView.image.size.height);
[button addTarget:self action:@selector(action:) forControlEvents:UIControlEventTouchUpInside];
barButton2 = [[UIBarButtonItem alloc] initWithCustomView:button];
NSArray *items = [NSArray arrayWithObjects: barButton1, barButton2, nil];
[self.toolbar setItems:items animated:NO];
Run Code Online (Sandbox Code Playgroud) UISegmentedControl当我将整个导航栏设置为黑色(self.navigationController.navigationBar.tintColor = [UIColor blackColor];)时,通常显示在所选按钮上的色调未显示.
这是一个我错过的错误吗?
我已经构建了一个UIViewController带有一堆控件的子类,只是意识到如果我旋转iPhone,一半的控件变得不可见.因此,我想以某种方式使UIViewController's UIView可滚动,以便当设备(或模拟器)旋转时,用户可以滚动视图以查看所有控件.
我希望在Interface Builder中完成所有这些操作.我试图将类视图的改变来自UIView于UIScrollView在阶级的编辑器,但没有滚动.我的视图控制器的基类很简单UIViewController <UIScrollViewDelegate>.
是否有一种简单的方法可以使我的视图控制器中的主视图可滚动而无需在IB中重新创建整个事物?
iphone interface-builder uiscrollview uiviewcontroller uiview
我有一个UITableView自定义单元格有一个TextField.我有DecimalPad,我们都知道,没有完成密钥.我之前已经解决了这种类型的问题,当我在正常的UIView上有一个"仅十进制"文本字段时,通过处理TouchesEnded事件然后检查是否TextField是第一个响应者,如果是,那么它将会重新签名,但是如果该技术可以现在工作然后我无法弄清楚TouchesEnded我应该使用谁(UIView所有内容都出现在,UITableViewCell,CellControler,TextField ......我想我已经尝试了一切).
我希望有另一种更清洁的方法来解决这个问题.
任何人?
有没有办法通过命令行知道XCode 的默认安装目录?(我知道默认是/ Developer,但如果我将其更改为/ XCode42,那么在这种情况下如何获取路径)
还设置了那些环境变量的位置以及这些变量的名称是什么?(就像在windows中我们给Java的路径)
任何人都可以帮助我从iPhone设备的iPhone配置实用程序解码崩溃日志下面
Oct 19 11:09:18 iPhone-AIPV02 kbd[1099] <Warning>: -[TIXPCDataTransport _handleForPurpose:withReplyBlock:] couldn't get data source for purpose=__TIRDTUD
Oct 19 11:09:18 iPhone-AIPV02 mClient[1096] <Warning>: __47+[TIUserDictionaryController loadWordKeyPairs:]_block_invoke_0 Received nil NSData for TIRemoteDataUserDict
Oct 19 11:09:20 iPhone-AIPV02 librariand[1100] <Notice>: MMe quota status changed: under quota
Oct 19 11:09:35 iPhone-AIPV02 lockdownd[29] <Notice>: 2fe93000 spawn_and_handle_checkin: Timeout on socket /var/run/lockdown/checkin.1012 waiting for com.apple.crashreportmover to checkin for Xcode. spawn=1350625160 select=1350625160 now=1350625175
Oct 19 11:09:35 iPhone-AIPV02 ReportCrash[1103] <Error>: libMobileGestalt copySystemVersionDictionaryValue: Could not lookup ReleaseType from system version dictionary
Oct 19 …Run Code Online (Sandbox Code Playgroud) 我使用MessageUI框架从我的应用程序发送带附件的邮件.但我得到以下错误,
2009-09-07 19:52:23.483 emailTest[11711:5b17]
Error loading /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.0.sdk/System/Library/DataClassMigrators/AccountMigrator.migrator/AccountMigrator: dlopen(/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.0.sdk/System/Library/DataClassMigrators/AccountMigrator.migrator/AccountMigrator, 265): Library not loaded: /System/Library/PrivateFrameworks/MobileWirelessSync.framework/MobileWirelessSync
Referenced from: /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.0.sdk/System/Library/DataClassMigrators/AccountMigrator.migrator/AccountMigrator
Reason: image not found
2009-09-07 19:52:23.489 emailTest[11711:5b17] [+[AccountsManager _migrateAccountsIfNeeded]] Accounts migration failed
[Switching to process 11711 local thread 0xf03]
Run Code Online (Sandbox Code Playgroud)
我的代码是,
MFMailComposeViewController *picker = [[MFMailComposeViewController alloc]init];
picker.mailComposeDelegate = self;
[picker setSubject:@"This is iPhone email attachment test"];
UIImage *sampleImg = [UIImage imageNamed:@"iPhone.jpg"];
NSData *imageData = UIImageJPEGRepresentation(sampleImg, 1);
[picker addAttachmentData:imageData mimeType:@"image/png" fileName:@"iPhone.jpg"];
NSString *emailBody = @"I am sending the image attachment with iPhone email service"; …Run Code Online (Sandbox Code Playgroud) 我有一个ipad应用程序,它使用Photos应用程序中的图像ALAssetsLibrary,然后将它们上传到Web服务器.到目前为止一切正常.
现在,如果我转到照片应用程序并编辑图像(比如裁剪)并上传,原始未裁剪的内容将上传.我正在使用资产网址访问/保存照片.
例如:
createPhoto:
assetUrl: assets-library://asset/asset.JPG?id=542F09CA-00E1-412E-A7E6-0C222E3F8FFB&ext=JPG,
UTIs: (
"public.jpeg"
),
UTI:public.jpeg
Run Code Online (Sandbox Code Playgroud)
这不是ALAssetsLibrary缓存问题,因为我已经尝试编辑,杀死应用程序,启动,上传仍然上传旧图像.
题:
iphone ×8
objective-c ×4
ios ×2
uiview ×2
xcode ×2
cocoa-touch ×1
command-line ×1
email ×1
ios6 ×1
ipad ×1
keyboard ×1
rotation ×1
uiscrollview ×1
uitoolbar ×1
xamarin.ios ×1
xcode4.2 ×1