iphone - 无法连接 iPad socket ?

标签 iphone ios xcode ipad

我正在创建 iPhone 应用程序的 iPad 版本(非通用)。我创建了所有 .m .h 和 XIB 文件的副本,并将“iPad”附加到每个文件以及我的所有类(class)的末尾。这当然很乏味且过于复杂,但我不知道更好的方法。

我的问题:当我将 iPad File's Owner 和 First Responder 连接到我的 iPad XIB(见图片)时,Xcode 将下面显示的 XIB 连接到 iPhone ViewController 代码 iPad ViewController 代码。

iPad XIB. When I connect the iPad XIB to the File's Owner and First Responder shown Xcode connects the XIB to my iPhone ViewController class, not the iPad ViewController

然后我转到代码(见下文),看看我是否可以直接从代码连接(那些小圆圈位于 Outlet 代码行的左侧)但无济于事。当我单击并拖动线并放开 XIB 时,它不起作用。它什么都不做。 iPad ViewController code. Doesn't connect to the iPad XIB shown at right.

如何将我的 iPad XIB 与我的 iPad 代码相关联(找不到更好的词)? iPad XIB 已经是目标构建 FWIW 的一部分。

最佳答案

  • 点击 iPad xib 文件中的 FileOwner..
  • 转到公用事业部门的身份检查员。
  • 你会在那里看到类名..确保它指向 iPad 代码类

关于iphone - 无法连接 iPad socket ?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10344897/

相关文章:

ios - FlexBox 不适用于 iPhone 6

iphone - Xcode 中的数字键盘

iphone - 使部分 NSString 斜体或粗体,而不是整个字符串

iphone - Cocos2d/Box2d CCRibbon 碰撞检测

ios - Xcode 8 无法存档 "Command/usr/bin/codesign failed with exit code 1"

iphone - XCode无法在设备上运行应用程序,说正在调试的程序没有运行

iphone - 从苹果下载 iphone 示例代码

iphone - 可滚动位置后窗口的背面

javascript - 根据移动方向更改 CSS

ios - 按home键后如何返回初始屏幕?可以说模拟重新启动