我将Xcode升级到最新版本:版本6.1(6A1030).
我使用Swift语言.
当我构建我的应用程序时,我有25个问题:
Apple Mach-O Linker error
Undefined symbols for architecture i386:
"__TFE10FoundationCSo11NSPredicateCfMS0_Ft6formatSSGSaPSs11CVarArgType___GSqS0__", referenced from:
__TFC19TestBentley_Network8EventDAO11updateEventfS0_FCS_5EventT_ in EventDAO.o
__TFC19TestBentley_Network8EventDAO10deletEventfS0_FCS_5EventT_ in EventDAO.o
"__TFE10FoundationCSo7NSArray8generatefS0_FT_CS_15NSFastGenerator", referenced from:
__TFC19TestBentley_Network8EventDAO10deletEventfS0_FCS_5EventT_ in EventDAO.o
"__TFE10FoundationCSo8NSString24convertFromStringLiteralfMDS0_FVSs12StaticStringDS0_", referenced from:
__TFO19TestBentley_Network13NotificationsCfMS0_FT8rawValueCSo8NSString_GSqS0__ in Notifications.o
__TFO19TestBentley_Network13Notificationsg8rawValueCSo8NSString in Notifications.o
__TFC19TestBentley_Network30NetworkSearchPropositionButtoncfMS0_FT5coderCSo7NSCoder_S0_ in NetworkSearchPropositionButton.o
__TFC19TestBentley_Network8HomeViewcfMS0_FT5frameVSC6CGRect9networkVCCS_21NetworkViewController9membersVCCS_21MembersViewController10servicesVCCS_22ServicesViewController8profilVCCS_20ProfilViewController8eventsVCCS_20EventsViewController_S0_ in HomeView.o
__TFC19TestBentley_Network24EventsListViewControllercfMS0_FT_S0_ in EventsListViewController.o
__TFC19TestBentley_Network8MenuViewcfMS0_FT5frameVSC6CGRect_S0_ in MenuView.o
__TFC19TestBentley_Network29NetworkSearchPropositionsList18reloadPropositionsfS0_FGSqCSo8NSString_T_ in NetworkSearchPropositionsList.o
...
"__TFE10FoundationSS19_bridgeToObjectiveCfSSFT_CSo8NSString", referenced from:
Run Code Online (Sandbox Code Playgroud) 我在XCode上的iOS应用程序项目中添加了共享扩展名。但是,当我选择一张照片并选择要共享的扩展名时,决不会调用ShareViewController的didSelectPost()函数!为了测试这一点,我只是在上面放了一个断点并添加了somme日志打印。
有关信息,我有一个由XCode创建的ShareViewController类以及主要的故事板和info.plist。
谢谢

我有7个车对象,我需要下载汽车图像并将其设置为Car对象.
下载完成后我在didFinishDownloadingToURL函数中检索图像,我有两个选择:1.直接从临时文件加载图像2.将文件移动到另一个位置并将其保存在目录中(例如).
问题是我不知道如何将这个后退图像设置为相应的对象!如果我使用第一个选项,我怎样才能找到好的和相应的对象来设置图像?
或者,如果我使用seconde选项:将文件保存到目录,如何找到相应的图像文件并将其设置为相应的对象?
实际上我使用NSURLSession从不同的网址下载图像.为此,我有管理URLSession回调的DownloadSessionDelegate.在这里你可以找到我的课程:
typealias CompleteHandlerBlock = () -> ()
class DownloadSessionDelegate: NSObject, NSURLSessionDelegate, NSURLSessionDownloadDelegate {
var handlerQueue : [String : CompleteHandlerBlock]!
class var sharedInstance:DownloadSessionDelegate {
struct Static {
static var instance :DownloadSessionDelegate?
static var token : dispatch_once_t = 0 ;
}
dispatch_once(&Static.token) {
Static.instance = DownloadSessionDelegate();
Static.instance!.handlerQueue = [String : CompleteHandlerBlock]();
}
return Static.instance!
}
// Session delegate
func URLSession(session: NSURLSession, didBecomeInvalidWithError error: NSError?) {
println("session error: \(error?.localizedDescription).")
}
func URLSession(session: NSURLSession, didReceiveChallenge challenge: NSURLAuthenticationChallenge, completionHandler: (NSURLSessionAuthChallengeDisposition, NSURLCredential!) …Run Code Online (Sandbox Code Playgroud)