我如何设置rootViewController的UINavigationController比其他的方法initWithRootViewController?
我想使用initWithNavigationBarClass:toolbarClass:为我的NavigationController提供自定义工具栏,所以我认为我不能使用initWithRootViewController.
我正在设置cornerRadius属性UILabel.它的工作正常所有版本iOS < 7.1.以下代码我用过,
UILabel *originaltagLbl = [[UILabel alloc]initWithFrame:CGRectMake(startX, startY, 100,30)];
[originaltagLbl setFont:[UIFont fontWithName:@"MuseoSans-500" size:15]];
[originaltagLbl setTextAlignment:NSTextAlignmentCenter];
[originaltagLbl setTextColor:UIColorFromRGB(0xffffff)];
originaltagLbl.backgroundColor = [UIColor redColor];
originaltagLbl.layer.cornerRadius = 5;
originaltagLbl.layer.borderColor = [UIColor redColor].CGColor;
originaltagLbl.layer.borderWidth = 1;
[scrollView addSubview:originaltagLbl];
Run Code Online (Sandbox Code Playgroud)
如果我使用它,只需将标签显示为rectanglular box,那么如何设置UILabelin 的角半径iOS 7.1
我想知道MKMapViewiphone编程中当前的缩放级别,我该怎么做?实际上我有一个应用程序,即少量参数(从中心到角落的半径MKMapView)正在返回商店详细信息,当我打开时MKMapView,半径非常高,当Radius较小时它会改变,所以我想要知道缩放级别并根据它设置我的webservice,如何获得当前MKMapView可见区域的缩放级别?
我正在创建UILabel,对于标签,我可以将字体名称设置为HelveticaNeue Regular,Light,UltraLight等,但我无法将字体名称设置为HelveticaNeue Thin,它无法按预期工作.我喜欢,
label.font = [UIFont fontWithName:@"HelveticaNeue-Thin" size:16];
Run Code Online (Sandbox Code Playgroud)
我也搜索了谷歌没有得到任何解决方案.如何解决这个问题?谢谢.
Homebrew对我意味着Check dependencies什么?这是Xcode5.1/iOS7.1问题吗?我已经浏览了这个链接.
$ brew install --verbose xctool
==> Downloading https://github.com/facebook/xctool/archive/v0.1.14.tar.gz
Already downloaded: /Library/Caches/Homebrew/xctool-0.1.14.tar.gz
==> Verifying xctool-0.1.14.tar.gz checksum
tar xf /Library/Caches/Homebrew/xctool-0.1.14.tar.gz
==> ./scripts/build.sh 'XT_INSTALL_ROOT=/usr/local/Cellar/xctool/0.1.14/libexec'
User defaults from command line:
IDEBuildLocationStyle = Custom
IDECustomBuildIntermediatesPath = /private/tmp/xctool-mj8w/xctool-0.1.14/build/./Intermediates
IDECustomBuildLocationType = Absolute
IDECustomBuildProductsPath = /private/tmp/xctool-mj8w/xctool-0.1.14/build/./Products
Build settings from command line:
XT_INSTALL_ROOT = /usr/local/Cellar/xctool/0.1.14/libexec
XT_IOS_SDK_VERSION_32 = 7.1
XT_IOS_SDK_VERSION_64 = 7.1
XT_IOS_SDK_VERSION_EXPANDED_32 = 71000
XT_IOS_SDK_VERSION_EXPANDED_64 = 71000
=== BUILD TARGET otest-query-ios OF PROJECT otest-query WITH CONFIGURATION Release ===
Check dependencies
No architectures to …Run Code Online (Sandbox Code Playgroud) 我正在使用UIImagePickerController捕获视频,我可以使用以下代码裁剪视频,
AVAsset *asset = [AVAsset assetWithURL:url];
//create an avassetrack with our asset
AVAssetTrack *clipVideoTrack = [[asset tracksWithMediaType:AVMediaTypeVideo] objectAtIndex:0];
//create a video composition and preset some settings
AVMutableVideoComposition* videoComposition = [AVMutableVideoComposition videoComposition];
videoComposition.frameDuration = CMTimeMake(1, 30);
//here we are setting its render size to its height x height (Square)
videoComposition.renderSize = CGSizeMake(clipVideoTrack.naturalSize.height, clipVideoTrack.naturalSize.height);
//create a video instruction
AVMutableVideoCompositionInstruction *instruction = [AVMutableVideoCompositionInstruction videoCompositionInstruction];
instruction.timeRange = CMTimeRangeMake(kCMTimeZero, CMTimeMakeWithSeconds(60, 30));
AVMutableVideoCompositionLayerInstruction* transformer = [AVMutableVideoCompositionLayerInstruction videoCompositionLayerInstructionWithAssetTrack:clipVideoTrack];
//Here we shift the viewing square up to the …Run Code Online (Sandbox Code Playgroud) 这是我的头脑:-)
我有一个功能齐全的CoreData填充UITableView内部UIViewController,我已经成功实现了"滑动删除选项"(这很简单),我还可以删除单个实例,其中有一个编辑按钮,红色圆圈内容出现.
我的问题是,我认为这是因为我有一个CustomCell,当我按下编辑按钮时,UILabels不要向右移动.
我尝试过使用-(void)layoutSubViews和其他一些,但没有任何作用.
我已经发布了我的代码cellForRowAtIndexPath.这是我的应用程序中的注释部分的一部分.这段代码有效,我只需要知道当我进入编辑模式时如何移动标签?
谢谢你的提示和建议:-)
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *cellIdentifier = @"Cell";
MNCustomCell *cell = [_mainTableView dequeueReusableCellWithIdentifier:cellIdentifier forIndexPath:indexPath];
if (cell == nil) {
cell = [[MNCustomCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellIdentifier];
}
//cell.textLabel.text = [_tableArray objectAtIndex:indexPath.row];
MNotes *mnotes = [[self fetchedResultsController] objectAtIndexPath:indexPath];
cell.noteTitle.text = mnotes.noteTitleString;
cell.noteSummary.text = mnotes.mainNoteString;
mnotes.createDate = [[NSDate alloc] init];
SORelativeDateTransformer *relativeDateTransformer = [[SORelativeDateTransformer alloc] init];
NSString *relativeDate = [relativeDateTransformer transformedValue:mnotes.createDate];
cell.noteDate.text …Run Code Online (Sandbox Code Playgroud) 好的,这是我的应用程序在iOS 7.0中的样子:

现在在iOS 7.1中由于某种原因它看起来像这样:

正如你所看到的那样,而不是白色模糊的背景(绿色的东西实际上是绿色的UITextField下面),它现在是灰色模糊的背景 - 如果你仔细观察,绿色仍然是可见的.
经过大量的实验,我发现这是因为它下方有一层灰色的层UIPickerView.这是我将隐藏属性设置UIPickerView为YES时的结果:

代码非常简单:
_swimlanePicker = [[UIPickerView alloc] initWithFrame:CGRectZero];
_swimlanePicker.delegate = self;
_swimlanePicker.dataSource = self;
[_swimlanePicker setShowsSelectionIndicator:YES];
_swimlaneTextField.inputView = _swimlanePicker;
Run Code Online (Sandbox Code Playgroud)
你有什么想法我怎么能隐藏(或改变这个灰色层的颜色/透明度)?我喜欢旧的外观,并希望在iOS 7.1中实现它.
UIAlertView并且UIActionSheet在iOS 8中没有正确显示,它隐藏了视图控制器,也没有显示警报视图标题.我从Xcode 5.1.1运行应用程序.


我有UITableView一个自定义单元格和一个自定义按钮,用于进入编辑模式以及自定义配件按钮.一切正常,但我希望在单元格中与其相邻的UIImageView另外两个UILabels位于其X位置,但只希望"ADD QTY" UILabel移动其X位置以便为附件按钮腾出空间.

我有一个UITableView带有它的细胞UITextViews。UITextFields很明显,键盘与下部单元格重叠,您看不到正在输入的内容。所以我想滚动tableview以使该字段可见。我编写了文档推荐的代码iOS:https://developer.apple.com/library/ios/documentation/StringsTextFonts/Conceptual/TextAndWebiPhoneOS/KeyboardManagement/KeyboardManagement.html
但键盘事件回调keyboardWillShow:是在编辑回调之前调用的。因此,当我尝试计算使活动文本视图可见所需的滚动时,我无法设置活动文本视图。UITextViewtextViewDidBeginEditing:
有人知道这个问题的解决方案吗?
我使用的是Xcode 6.0.1,我无法在模拟器上使用我的苹果无线键盘输入文本。
以前我使用过Xcode 5.1.1,它工作得很好。
我发现在 iOS 模拟器上不使用键盘输入文本会更加困难。
ios ×9
iphone ×6
objective-c ×6
ios7.1 ×3
uitableview ×3
avfoundation ×1
custom-cell ×1
edit ×1
homebrew ×1
inputview ×1
ios8 ×1
iphone-5 ×1
mkmapview ×1
uifont ×1
uipickerview ×1
uiscrollview ×1
uitextfield ×1
uitextview ×1
uitoolbar ×1
video ×1
xcode6.0.1 ×1
xctool ×1