我正在尝试将我NSFetchRequest的核心数据设置为检索实体中特定属性的唯一值.即
具有以下信息的实体:
  name | rate | factor |
_______|______|________|
John   |  3.2 |    4   |
Betty  |  5.5 |    7   |
Betty  |  2.1 |    2   |
Betty  |  3.1 |    2   |
Edward |  4.5 |    5   |
John   |  2.3 |    4   |
Run Code Online (Sandbox Code Playgroud)
我如何设置返回数组的请求:John,Betty,Edward?
我现在遇到一个问题我正在尝试用Xcode 4.0构建一个项目,希望有人可以为我阐明这个问题.
我正在尝试使用ZBar SDK,并遵循此处概述的指南中列出的说明:
http://zbar.sourceforge.net/iphone/sdkdoc/camera.html
但是,我得到了同样的错误.我检查了John的帖子,但是,他提到的路径不在我的LIBRARY_SEARCH_PATH中.
我正在使用Xcode 4.0,我正在尝试为iPad 4.3模拟器构建我的项目.
(我得到的错误):
Undefined symbols for architecture i386:
  "_objc_msgSend", referenced from:
  _main in main.o
  -[PrototypeAppDelegate application:didFinishLaunchingWithOptions:] in PrototypeAppDelegate.o
  -[PrototypeAppDelegate dealloc] in PrototypeAppDelegate.o
  -[Home loadGRView] in Home.o
  ...
"_UIApplicationMain", referenced from:
  _main in main.o
"_OBJC_CLASS_$_NSAutoreleasePool", referenced from:
  objc-class-ref in main.o
"_objc_msgSendSuper2", referenced from:
  -[PrototypeAppDelegate dealloc] in PrototypeAppDelegate.o
  -[PrototypeAppDelegate_iPhone dealloc] in PrototypeAppDelegate_iPhone.o
  ...
"_objc_setProperty", referenced from:
  -[PrototypeAppDelegate setTabBarController:] in PrototypeAppDelegate.o
  -[PrototypeAppDelegate setTheNavController:] in PrototypeAppDelegate.o
  ...
Run Code Online (Sandbox Code Playgroud)
等等
我试过看看ZBar sdk附带的ReaderSample代码,并认为问题是我错过了他们在他们的应用程序中使用的几个框架,但包括那些框架只是增加了我得到的错误数量.这是Build设置问题吗?有没有人有我可以尝试做的想法?
PS:我找到了两个类似于这个问题的线程,并尝试了他们推荐的各种解决方案,仍然无法得到解决方案
-http://stackoverflow.com/questions/1452466/suddenly-i-am-not-able-to-build-for-the-iphone-simulator -http://stackoverflow.com/questions/1456185/build-error需要-missing-架构-I386-在文件/ 1467238#1467238
我希望我正确使用这个线程...我对堆栈溢出相对较新.Ť
因此,对于整个UIAppearance方法进行处理并迅速进行处理,我还是一个新手。欢呼声中没有大量的文档资料。
我正在尝试通过UIAppearance设置边框半径,其中包括:
CircleButton.appearance.roundBorderRadius = 9
Run Code Online (Sandbox Code Playgroud)
我的CircleButton类实现:
public class CircleButton : UIButton{
     @nonobjc var roundBorderRadius: CGFloat? {
        get { return self.layer.cornerRadius }
        set {
            self.layer.cornerRadius = newValue!
        }
    }
}
Run Code Online (Sandbox Code Playgroud)
然后,我将情节提要中的所有内容都连接到包含CircleButton的ViewController。没有编译或生成错误。
但是,在运行时我得到了:
在以下位置出现“线程1:EXC_BAD_ACCESS”错误:
CircleButton.appearance.roundBorderRadius = 9
Run Code Online (Sandbox Code Playgroud)
有什么建议吗?