小编djr*_*ero的帖子

Xcode 4:iOS二进制大小和条带

我试图最小化我的iOS 4游戏中的代码大小,所以我尝试启用所有与条带相关的命令,并使用-Os标志.

然而,奇怪的是我仍然发现二进制文件非常大,当我手动尝试使用控制台剥离二进制文件时("使用strip命令"),它实际上将它从18 mb减少到12.3 mb.

Xcode实际上是否使用了不同的条带机制,或类似的东西?使用console strip命令的问题是它给出了一条消息,说它使代码符号无效,所以我想知道是否可以在此strip命令之后使代码签名工作.

gcc strip ios xcode4

2
推荐指数
1
解决办法
2086
查看次数

JSON和嵌套的NSDictionary

在解析JSON响应之后,我得到一个包含其他字典的NSDictionary,这些字典是一些事先未知的键的值(308,1):

{
"308":{
    "id":"308",
    .....

},
"1":{
    "id":"1",
    .....
     }
}
Run Code Online (Sandbox Code Playgroud)

我怎么在这里使用valueForKey,因为我不知道密钥?如何访问嵌套字典?谢谢!

parsing json objective-c nsdictionary

1
推荐指数
1
解决办法
2395
查看次数

Xcode - "提供的普遍名称已被使用" - 如何找到文件夹

我在Xcode中收到此消息:

    The provided ubiquity name is already in use., 
NSURL=file://localhost/var/mobile/Applications/6C748748-9689-4F40-B8D7-
CDE8CA280FF8/Documents/SharedCoreDataStores/138F8194-DCC7-4D66-859B-
B2C35BDF2984/iCloudStore.sqlite
Run Code Online (Sandbox Code Playgroud)

如何找到此文件的位置(iCloudStore.sqlite)?我试过〜/ Library/Containers和〜/ Library/Mobile Documents.

谢谢

xcode icloud

1
推荐指数
1
解决办法
693
查看次数

为什么没有调用didDeselectRowAtIndexPath

调用didSelectRowAtIndexPath,但未调用didDeselectRowAtIndexPath.我不是为什么.我在线搜索.很多类似的问题,但我找不到答案.

这是我的桌面视图

//tableView
    let tempTableView = UITableView()
    tempTableView.delegate = self
    tempTableView.dataSource = self
    tempTableView.translatesAutoresizingMaskIntoConstraints = false
    self.view.addSubview(tempTableView)
    self.tableView = tempTableView
Run Code Online (Sandbox Code Playgroud)

这是代表

 //MARK: UITableViewDelegate
func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath) {

   self.cayegoryArray[indexPath.row].isSelected = true
   self.tableView?.reloadRowsAtIndexPaths([indexPath], withRowAnimation: UITableViewRowAnimation.None)

}

func tableView(tableView: UITableView, didDeselectRowAtIndexPath indexPath: NSIndexPath) {

    self.cayegoryArray[indexPath.row].isSelected = false
    self.tableView?.reloadRowsAtIndexPaths([indexPath], withRowAnimation: UITableViewRowAnimation.None)
}
Run Code Online (Sandbox Code Playgroud)

这是细胞.

override init(style: UITableViewCellStyle, reuseIdentifier: String?) {
    super.init(style: style, reuseIdentifier: reuseIdentifier)

    self.selectionStyle = .Default

    setInterface()
    setLayout()
}

required init?(coder aDecoder: NSCoder) {
    fatalError("init(coder:) has not …
Run Code Online (Sandbox Code Playgroud)

iphone uitableview tableviewcell ios

1
推荐指数
1
解决办法
1892
查看次数

iOS应用程序默认语言"en"未应用

在Xcode 4.6.3中我设置了"Localization native development region"= en.

我为我的应用程序提供西班牙语,英语和俄语语言环境.

不幸的是,当我将Iphone模拟器的语言设置为例如"德语"时,我的应用程序使用西班牙语语言环境.

我怀疑是因为我有一台"西班牙电脑".

但我希望我的应用程序的客户获得英语,如果应用程序不提供他们的区域设置.

我怎样才能确保这一点?

有一点我注意到了.在"复制包资源"选项卡中,我看到我的其他Localizable.strings文件显示为红色.但我知道他们尽管已经部署了红色...

xcode localization ios

0
推荐指数
1
解决办法
4030
查看次数

iOS:PHAsset和检测DNG RAW格式

我得到了Apple的“ SamplePhotosApp ” 示例代码,并且在相册网格照片布局中,试图检测DNG RAW文件(如果是DNG,则输入徽章)。

默认的cellForItemAt

override func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
        let asset = fetchResult.object(at: indexPath.item)

        // Dequeue a GridViewCell.
        guard let cell = collectionView.dequeueReusableCell(withReuseIdentifier: String(describing: GridViewCell.self), for: indexPath) as? GridViewCell
            else { fatalError("unexpected cell in collection view") }

        // Add a badge to the cell if the PHAsset represents a Live Photo.
        if asset.mediaSubtypes.contains(.photoLive) {
            cell.livePhotoBadgeImage = PHLivePhotoView.livePhotoBadgeImage(options: .overContent)
        }

        // Request an image for the asset from the PHCachingImageManager.
        cell.representedAssetIdentifier …
Run Code Online (Sandbox Code Playgroud)

xcode ios dng uicollectionview phasset

0
推荐指数
1
解决办法
747
查看次数