标签: xcode6

UIView初始化程序swift Xcode 6 beta 5

xcode 6 beta 5

错误:

类'ClassName'不实现其超类的必需成员

    class ClassName:UIView
Run Code Online (Sandbox Code Playgroud)

也显示错误

        init(frame: CGRect) {
            super.init(frame: frame)
            // Initialization code
            self.backgroundColor = UIColor.clearColor()
        }
Run Code Online (Sandbox Code Playgroud)

覆盖声明需要'ovveride'关键字

我在init之前放置了覆盖,删除了ovveride错误但是没有超类错误

提前致谢

ios swift xcode6

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

无法在Xcode 6 beta 5中编译EZAudio

我试图在我的Swift应用程序中使用EZAudio.我添加了Objective C桥接头,但是我仍然收到以下错误:

Function definition is not allowed here (line 34) in EZPlot.h
Run Code Online (Sandbox Code Playgroud)

有了这条线:

typedef NS_ENUM(NSInteger,EZPlotType){
Run Code Online (Sandbox Code Playgroud)

我意识到这是Xcode版本的早期阶段,但有没有人设法得到编译的东西?

objective-c swift xcode6

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

unregisterForRemoteNotifications对iOS8不起作用 - 推送通知

我决定从我的应用程序关闭"提醒"开关控制的通知.我在我的应用程序中添加了这些行,使其支持iOS 7和iOS 8,并且当我关闭推送通知时它正在工作.但是当我决定打开开关并关闭应用程序时,当我再次打开它时它又回到OFF而不是打开.因此,我必须转到设置 - >通知中心 - >"我的应用程序"并重新打开所有内容,因为它们已关闭...非常奇怪,当我在iOS 7上测试时,它正在运行但不适用于iOS 8.任何建议都表示赞赏.谢谢.

- (IBAction)reminderSwitchToggled:(id)sender {

      UIApplication *application = [UIApplication sharedApplication];

      if ([sender isOn]) {

         #ifdef __IPHONE_8_0
             if(NSFoundationVersionNumber > NSFoundationVersionNumber_iOS_7_1) {
                 UIUserNotificationSettings *settings = [UIUserNotificationSettings settingsForTypes:UIUserNotificationTypeBadge|UIUserNotificationTypeSound|UIUserNotificationTypeAlert categories:nil];
                 [[UIApplication sharedApplication] registerUserNotificationSettings:settings];

             }
              else
         #endif
                 {
                   [application registerForRemoteNotificationTypes:UIRemoteNotificationTypeBadge| UIRemoteNotificationTypeAlert| UIRemoteNotificationTypeSound];
                 }

     } else {

         #ifdef __IPHONE_8_0
           if(NSFoundationVersionNumber > NSFoundationVersionNumber_iOS_7_1) {

               [[UIApplication sharedApplication] registerUserNotificationSettings:[UIUserNotificationSettings
                                                                             settingsForTypes:
                                                                             (UIUserNotificationType)
                                                                             (UIUserNotificationTypeNone) 
                                                                             categories:nil]];

               [application unregisterForRemoteNotifications];

        }

          else
      #endif
          {
               [application unregisterForRemoteNotifications];

           }
   }
}
Run Code Online (Sandbox Code Playgroud)

objective-c push-notification ios xcode6 ios8

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

Swift应用程序在真实设备上崩溃但在模拟器上运行

这个函数从昨天开始获取日期; 它正在我的模拟器上工作,但它与我的真实设备崩溃.

我正在使用Xcode6 Beta 6.

var tuple :(value Int, unit:NSCalendarUnit) = (1, NSCalendarUnit.CalendarUnitDay)
var date = NSDate()
var yesterday = NSCalendar.currentCalender().dateByAddingUnit(tuple.unit, value: (-tuple.value), toDate: date, options: NSCalendarOptions.SearchBackwards)
Run Code Online (Sandbox Code Playgroud)

这是我在我的真实设备上得到的错误:

-[_NSCopyOnWriteCalendarWrapper dateByAddingUnit:value:toDate:options:]: unrecognized selector sent to instance 0x176cca10
Run Code Online (Sandbox Code Playgroud)

ios swift xcode6

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

无法将UITableViewDataSouce和UITableViewDelegate设置为UIViewController

当我尝试将委托和数据源设置为UIViewController时,在UITableViewController中正常运行的所有函数都被检测为错误.

func numberOfSectionsInTableView(tableView: UITableView!) -> Int {
    // #warning Potentially incomplete method implementation.
    // Return the number of sections.
    return 1
}

func tableView(tableView: UITableView!, numberOfRowsInSection section: Int) -> Int {
    // #warning Incomplete method implementation.
    // Return the number of rows in the section.
    return 10
}
Run Code Online (Sandbox Code Playgroud)

错误是

FirstViewController.swift:11:1: Type 'FirstViewController' does not conform to protocol 'UITableViewDataSource':

UIKit.UITableViewDataSource:2:48: Protocol requires function      'tableView(_:numberOfRowsInSection:)' with type '(UITableView, numberOfRowsInSection: Int) -> Int'
FirstViewController.swift:29:10: Candidate has non-matching type '(UITableView!, …
Run Code Online (Sandbox Code Playgroud)

xcode uitableview uiviewcontroller swift xcode6

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

地理定位在iOS 8模拟器中不起作用

我已经升级了cordova 3.5中的geolocation插件,通过以下帖子解决了iOS 8中的问题.

http://shazronatadobe.wordpress.com/2014/09/18/cordova-ios-and-ios-8/

在iOS8模拟器中运行应用程序后,我收到通知"允许"MyApp"在您使用应用程序时访问您的位置?" 但locationManager::didFailWithError在允许位置服务使用应用程序后,它仍然显示错误(null).我试图关闭模拟器并一次又一次地运行它.此外,通过检查模拟器中的设置,似乎位置服务处于活动状态(设置>隐私>位置服务> MyApp>使用时).通过在iOS 7中运行相同的应用程序,模拟器工作正常并且能够检测到lat/lng.

仅供参考:我使用Xcode 6来构建应用程序.

任何帮助/建议都会有所帮助.

geolocation ios cordova xcode6 ios8

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

xcode - 如何将xcode 6 storyboard文件降级为xcode 5?

如何将在xcode 6中创建的故事板中的一个降级为xcode 5?请注意,我使用的是xcode 5.

xcode ios xcode5 xcode6

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

XCode没有创建.h文件

我正在使用Xcode 6.0.1

我创建了一个自动生成.h和.m文件的新项目.

当我尝试添加新的Objective-c文件时,它只创建.m文件..h文件未生成.我尝试了所有的偏好,没有找到一个选项,上面写着"生成.h文件".

出于好奇,我检查了Library/Developer/Xcode/Templates,其中只存在一个文件夹.

/ Users/rajeshreddy/Library/Developer/Xcode/Templates Rajeshs-MacBook-Pro:模板rajeshreddy $ ls文件模板cocos2d v3.x Rajeshs-MacBook-Pro:模板rajeshreddy $

有没有我可以启用生成.h文件的设置.

xcode ios xcode6

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

提交到应用商店时出现ITMS-4238错误

我在xcode 6上,我正在尝试向应用商店提交iOS(目标:iOS8)应用,我收到itms-4238错误.它说,已经有相同的版本,但到目前为止我还没有成功提交过这个应用程序.所以在itunes connect上没有提交的构建.所以我不知道为什么我得到这个.

我正在做的是:

从Organizer创建存档提交二进制文件我也尝试使用ApplicationLoader提交,但结果是相同的.

我得到的错误就是这个.

错误ITMS-4238:"冗余二进制上传.在SoftwareAssets/PrereleaseSoftwareAsset上已存在用于列车'1.0'的构建版本'1.1'的二进制上载

我已经设置了更高的版本0.1.

但仍会导致错误.

app-store ios xcode6

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

Xcode 6查看调试不可用

我正在调试我的项目并将其移动到支持iOS 8.在许多其他问题中,我注意到Xcode 6的新视图调试功能在调试栏中不可用,并且在"应用程序"菜单栏中也不可用.

是否有此功能的构建设置?

调试栏,视图调试图标应显示在最右侧

Debug菜单栏,查看调试显示为灰色

debugging xcode ios xcode6 ios8

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