问题标签 [xcode5.0.1]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
4 回答
9020 浏览

ios - 如何以及在哪里初始化 Xcode 5 中的全局 NSMutableArray

我正在尝试初始化一个全局 NSMutableArray,我可以在以后添加整数。我只需要知道我应该如何以及在哪里初始化我的数组,以便我以后在程序中使用的任何函数都可以访问和更改它。另外我正在使用 Xcode 5 并且知道该数组的长度需要为 180。

0 投票
1 回答
145 浏览

iphone - 无法在 xcode5 的组表视图中显示数据

我是 xcode5 的新手。我曾经在我的应用程序中对 tableview 进行分组。它在 iOS6.1 中工作正常,但在 iOS7 中不显示数据。它只是显示“标题”部分。那是我的代码:

我不明白为什么我的 tableViews 显示在 xcode4 中,而 xcode5 没有。我正在使用动态原型内容分组样式 UITableView。

0 投票
1 回答
879 浏览

ios - 如何知道谷歌地图iOS sdk上两个位置之间的每条路线位置

我正在使用谷歌地图 iOS sdk来获取方向。通过此链接帮助我在两点之间绘制路线。现在我无法向最终用户提供路线指示(例如:左转、右转)。如何解决这个问题?请帮助我。现在我正在使用以下代码

}

0 投票
1 回答
54 浏览

objective-c - xCode 5 选项卡式应用程序未在装有 iOS 6 的 iPhone 上构建

我使用最近从 Apple 下载的 xCode 5.01 创建了一个选项卡式应用程序,并且没有在其中添加任何其他内容。它在模拟器上运行良好,但是当我尝试在装有 OS6 的 iPhone 4S 上运行它时,构建失败并出现以下错误:

  1. 未找到 UIKit/UIKit.h。

  2. 找不到 Prefix.pch 文件。

我到处查看并将部署目标更改为 6.0,但它并没有解决问题。这是怎么回事?

编辑:另外,根据建议,我删除了 UIKit 框架,但是当我尝试重新添加它(根据建议)时,结果发现它不存在。

编辑 2:重新安装 xCode 解决了这个问题。去搞清楚。

0 投票
1 回答
74 浏览

ios - UIImageView 在缩放时向下/向右跳跃

我正在尝试从其中心缩放 UIImageView。中心刻度有效,但我有一个问题!当我触摸图像时,它会在缩放时向下/向右跳跃。

这是我的代码:

注意:当我显示此 UIImageView 的尺寸检查器时,原点有一个从左上角向下和向右的箭头。我试图建立这个中心,但它没有帮助。

希望能在这里得到帮助,在此先感谢。

/巨魔

0 投票
1 回答
4404 浏览

xcode - iOS 7 - 固定状态栏,现在 PhoneGap 应用程序底部被截断 20px

我的 PhoneGap 应用程序在 iOS 7 上搞砸了,显然大多数人一开始都是这样 - 状态栏很清晰,文本位于(重叠)我的应用程序基于 HTML 的导航栏的顶部。我通过以下方式解决了这个问题:

在 [应用名称] info.plist 中:

在 MainViewController.m 下面- (void)viewWillAppear:(BOOL)animated是:

我不会费心拍摄 MainViewController.xib 文件的设置窗格的图像,因为我很确定它们与我在 info.plist 中设置的内容无关?让我知道我是否错了。

我的应用程序也支持旋转,以防万一。我正在使用 Cordova 2.1.0。


问题

由于我在尝试使 iOS 7 的状态栏正确显示时添加的内容,我的 HTML 代码在底部被截断了 20 像素。如果我在应用程序的页面底部并且我拖动手指以进一步向下滚动,我实际上可以看到我的页面底部,但是当我抬起手指时它仍然被截断 20 像素(如果这是没有意义的)。这里有什么问题?我该如何解决?在 iOS 6 及更低版本中,这不是问题 - 一切都很完美。

谢谢!

0 投票
1 回答
493 浏览

map - Does't working in MKDirections to get iOS 7 Map Directions and Routes in two points?

I have tried the map directions in iOS 7 sample codes in following linkiOS 7 Map Directions and Routes It's working only in US based latitude and longitude .I have tried indian based latitude and longitude it's not working .response came to direction not available.any one help out.

0 投票
3 回答
1954 浏览

objective-c - How to access Tab View Controller from another View Controller

my storyboardI'm having trouble accessing my view controllers under the tab bar controller. Here is what my storyboard looks like:

  1. View Controller A (-> Page View Controller -> View Controller C
  2. View Controller A -> Tab Bar Controller (MyTabBarController.h/.m) -> Navigation Controller (MyNavigationController.h/.m)-> View Controller B (TabViewController.h/.m)
  3. Tab Bar Controller (MyTabBarController.h/.m) -> View Controller D
  4. Tab Bar Controller (MyTabBarController.h/.m) -> View Controller E

From View Controller A I have an IBAction called loginButton that is connected to the Tab Bar Controller, and currently it looks like this:

I'm not able to get this displayed correctly. I am getting a bunch of warnings in this piece of code. and it is also not showing the different tab items in the bottom of the Tab Bar, even though I have put images/text on each tab.

So how do I display/access the view controllers inside the Tab Bar Controller correctly? (ie View Controllers C/D/E)?

0 投票
2 回答
1085 浏览

ios - 尝试更新 UILabel 时保持未使用的表达式结果

一般来说,我对编程很陌生。我正在尝试用整数生命更新 UILabel“生命”。但是我一直在该行中收到警告“未使用的表达式结果”

生活.text = @"",生活;

0 投票
7 回答
9320 浏览

ios - UIImageView 显示在情节提要中,但未显示在模拟器中

我在情节提要中使用 uiimageview 添加了图像并将它们连接到 iboutlets 并且它们没有出现在模拟器中。我不认为它们不在屏幕上,因为它们与其他图像非常接近,并且我在其他线程中看到可能有问题的自动布局已关闭。如果有帮助,这是一些代码。没有一颗心会出现在模拟器中。

编辑:我只是将其他图像之一移动到屏幕的中心,当我清理/构建/运行时,模拟器中没有任何变化。因此,出于某种原因,我在情节提要中所做的任何更改都不会被转移到模拟器中。昨晚一切正常,我不确定今天下午会发生什么变化。