随着Xcode 6的推出,Apple取消了在Universal应用程序中轻松拥有iPad和iPhone多个故事板的功能.因此,您无法在旋转面板/设置上区分iPad和iPhone.
如何阻止iPhone应用程序旋转到横向,同时仍然允许iPad应用程序这样做.
这是你只能在代码中做的事吗?如果是,我仍然使用Objective C,而不是Swift.
如何将背景渐变应用于启动屏幕文件?
您是否应该只为背景包含大图像,还是可以在启动屏幕文件中运行代码来进行自定义绘图?
我的故事板中有2个视图控制器,VC_A和VC_B
我在VC_A中嵌入了一个导航控制器,它是一个表视图控制器,然后我控制将Prototype Cell拖到VC_B中以创建一个segue.如果我选择"show""选择segue"然后在VC_B中我可以看到导航栏的轮廓但我无法选择它或添加任何条形按钮,它也不会出现在分层视图中.

但是,如果我"push (deprecated)"在选择segue的类型时选择了该选项,我可以在VC_B中选择导航栏并向其添加按钮,它也会在分层视图中显示为导航项.
我能找到的唯一工作是选择show,然后push(deprecated)在属性检查器中将segue更改为,以便导航项将显示在分层视图中,然后将segue更改回show.但我担心这可能会导致进一步的问题.
有没有办法在不使用解决方法的情况下将条形按钮添加到VC_B的导航栏?
我有一个新的iPad的Retina,我想使用它与Xamarin Studio开发和XCode的6.过去,用的XCode 5您只需连接设备,然后单击上面写着"用于开发"的按钮.但是6的XCode没有该按钮了,当我尝试建立我的应用程序在Xamarin Studio中的设备我得到的错误信息说"无法安装应用程序"/用户/ jzacherl /项目/名Cycom /名Cycom /名Cycom /斌/ iPhone /调试/对设备的iPad CyCom.app":您的应用程序未能代码签名检查检查你的证书,配置配置文件和捆绑IDS也许你的设备是不是所选配置文件的一部分(错误:0xe8008015) ."
我的应用程序应该支持iOS 7和iOS 8.我已经尝试将目标部署更改为7和8,我尝试重新启动我的mac /设备并构建/清理我的项目.

我刚刚更新了我的xcode安装以使用xcode 6.0.1,以便开始为ios8设备编译我的应用程序.出于某种原因,我无法正确签署使用以下内容生成的应用程序文件:
xcodebuild -project GrantM/GrantM.xcodeproj -configuration Release
Run Code Online (Sandbox Code Playgroud)
它编译代码,看起来很好,但运行:
/usr/bin/codesign --verify -vvvv GrantM/GrantM.app
Run Code Online (Sandbox Code Playgroud)
给我吗:
Program /usr/bin/codesign returned 1 : [GrantM/GrantM.app: resource envelope is obsolete]
Codesign check fails : GrantM/GrantM.app: resource envelope is obsolete
Run Code Online (Sandbox Code Playgroud)
使用以下命令检查代码是否已签名:/ usr/bin/codesign -dv GrantM/GrantM.app
收益:
Executable=Documents/GrantM/GrantM/GrantM.app/GrantM
Identifier=com.grantapps.GrantM
Format=bundle with Mach-O universal (armv7 (16777228:0))
CodeDirectory v=20200 size=647 flags=0x0(none) hashes=23+5 location=embedded
Signature size=4336
Signed Time=24 Sep 2014 12:54:53 pm
Info.plist entries=34
TeamIdentifier=N3KKU46JLY
Sealed Resources version=2 rules=5 files=55
Internal requirements count=1 size=180
Run Code Online (Sandbox Code Playgroud)
有没有其他人在OSX 10.9.5和xcode 6.0.1上遇到类似的问题?或者我只是有点愚蠢并做一些明显错误的事情?
另外,我能够找到在xcode中生成的应用程序的调试版本,并且可以成功签名,但它是一个调试版本,它不适用于distrobution.我甚至无法手动签署xcodebuild生成的应用程序文件.
感谢您提前提供的任何帮助或建议.
我有一个应用程序,我需要重命名,所以代码可以重复使用只有轻微的变化,我有困难.
我按照这个链接,似乎覆盖它,但当我尝试构建它时,我收到一个链接错误,其中也是如下:
链接到资源:
http://matthewfecher.com/app-developement/xcode-tips-the-best-way-to-change-a-project-name-in-xcode/
这是我得到的链接错误和我看到的信息
Ld /Users/jeffjanes/Library/Developer/Xcode/DerivedData/solfEightFive-aqlpurtbbyfkqmgjdryrxicllljh/Build/Products/Debug-iphoneos/solfEightFiveTests.xctest/solfEightFiveTests normal arm64
cd "/Users/jeffjanes/Xcode Projects/solfEightFive/shell"
export IPHONEOS_DEPLOYMENT_TARGET=8.0
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch arm64 -bundle -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.0.sdk -L/Users/jeffjanes/Library/Developer/Xcode/DerivedData/solfEightFive-aqlpurtbbyfkqmgjdryrxicllljh/Build/Products/Debug-iphoneos -F/Users/jeffjanes/Library/Developer/Xcode/DerivedData/solfEightFive-aqlpurtbbyfkqmgjdryrxicllljh/Build/Products/Debug-iphoneos -F/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.0.sdk/Developer/Library/Frameworks -F/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/Frameworks -F/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.0.sdk/Developer/Library/Frameworks -filelist /Users/jeffjanes/Library/Developer/Xcode/DerivedData/solfEightFive-aqlpurtbbyfkqmgjdryrxicllljh/Build/Intermediates/solfEightFive.build/Debug-iphoneos/solfEightFiveTests.build/Objects-normal/arm64/solfEightFiveTests.LinkFileList -Xlinker -rpath -Xlinker @executable_path/Frameworks -Xlinker -rpath -Xlinker @loader_path/Frameworks -dead_strip -bundle_loader /Users/jeffjanes/Library/Developer/Xcode/DerivedData/solfEightFive-aqlpurtbbyfkqmgjdryrxicllljh/Build/Products/Debug-iphoneos/shell.app/shell -framework XCTest -fobjc-arc -fobjc-link-runtime -miphoneos-version-min=8.0 -Xlinker -dependency_info -Xlinker /Users/jeffjanes/Library/Developer/Xcode/DerivedData/solfEightFive-aqlpurtbbyfkqmgjdryrxicllljh/Build/Intermediates/solfEightFive.build/Debug-iphoneos/solfEightFiveTests.build/Objects-normal/arm64/solfEightFiveTests_dependency_info.dat -o /Users/jeffjanes/Library/Developer/Xcode/DerivedData/solfEightFive-aqlpurtbbyfkqmgjdryrxicllljh/Build/Products/Debug-iphoneos/solfEightFiveTests.xctest/solfEightFiveTests
ld: file not found: /Users/jeffjanes/Library/Developer/Xcode/DerivedData/solfEightFive-aqlpurtbbyfkqmgjdryrxicllljh/Build/Products/Debug-iphoneos/shell.app/shell
clang: error: linker command failed with exit code 1 (use -v to see invocation)
有什么我想念的吗?我试过清理它,似乎没有效果.
这只是一些澄清,上面链接中描述的过程建议如下:
在屏幕左上角的项目导航器窗格中,轻轻双击项目名称.然后允许Xcode重命名文件
和
以相同的方式重命名方案
这就是我所做的一切,也许这本身就不够,所以如果有人知道正确的方法,请告诉我.
在自动布局之前,我通过设置框架来设置项目中背景的高度animateWithDuration.
func setUpBackground() {
self.backgroundView.frame = CGRect(x: 0, y: 0, width: 320, height: 10)
self.backgroundView.backgroundColor = UIColorFromRGB(0x2d2d2d).CGColor
}
func AnimateBackgroundHeight() {
UIView.animateWithDuration(0.5, animations: {
self.backgroundView.frame = CGRect(x: 0, y: 0, width: 320, height: 600)
})
}
Run Code Online (Sandbox Code Playgroud)
在我将项目转换为自动布局后,我注意到动画发生但背景高度在之后快速恢复到原始大小/样式(界面构建器设置).我读到,当打开自动布局时,约束将覆盖设置UIView尺寸CGRect.
因此,我想知道如何在Auto-layout ON的情况下实现相同的高度变化动画效果.
我希望没有人告诉我RTFM,因为我在这里和Apple Developer上一直在努力解决这个问题并进行大量搜索.
我在此声明中收到EXC-BAD-ACCESS错误:
var thisPredicate = NSPredicate(format: "(sectionNumber == %@"), thisSection)
Run Code Online (Sandbox Code Playgroud)
thisSection的Int值为1,当我将鼠标悬停在其上时显示值1.但是在调试区域我看到了这个:
thisPredicate = (_ContiguousArrayStorage ...)
Run Code Online (Sandbox Code Playgroud)
使用String的另一个谓词显示为ObjectiveC.NSObject为什么会发生这种情况?
我在Xcode 6 beta中试用了苹果的新语言swift.我正在尝试以编程方式在按下表格视图单元格时切换视图,尽管它只是拉出一个空白的黑屏.在我的代码中,我评论了那些不起作用的东西.他们只会让iOS模拟器崩溃.我的代码:
// ViewController.swift
// Step-By-Step Tip Calculator
// Created by Dani Smith on 6/17/14.
// Copyright (c) 2014 Dani Smith Productions. All rights reserved.
import UIKit
var billTotalPostTax = 0
class BillInfoViewController: UIViewController {
//outlets
@IBOutlet var totalTextField: UITextField
@IBOutlet var taxPctLabel: UILabel
@IBOutlet var resultsTextView: UITextView
@IBOutlet var taxPctTextField : UITextField
//variables
var billTotalVar = ""
var taxPctVar = ""
//actions
override func viewDidLoad() {
super.viewDidLoad()
refreshUI()
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
// Dispose of any …Run Code Online (Sandbox Code Playgroud) 如何使用尺寸类别唯一识别iPhone 6和iPhone 6以及纵向屏幕?
我的应用程序在iPhone 4和iPhone 5中看起来不错,但由于屏幕尺寸的原因,iPhone 6和6中的空白空间相同.虽然使用自动布局我不能仅为iPhone 6和6加上单独增加字体大小或视图大小.我知道我们可以使用大小类来改变字体大小和视图大小.但在我的情况下,不知道该怎么做.
使用xCode 6.1和我的应用程序支持从iOS 7到最新的iOS 8.1.我希望只在故事板中使用解决方案,因为我在故事板中完全完成了我的UI设计.如果storyboard的功能有限以满足我的需求,请告诉我如何通过应用程序实现相同的代码?
xcode6 ×10
ios ×4
ios8 ×4
xcode ×4
swift ×3
iphone ×2
codesign ×1
core-data ×1
objective-c ×1
uiview ×1
universal ×1
view ×1
xamarin.ios ×1
xcodebuild ×1