我没有定义断点,分别删除了所有现有的断点。 然而它停在一个特定的地方,我不明白。它不在我的代码中。它在线程上更低级别?见截图。
我该如何避免?
其他信息/代码:
似乎停在" LastselectedObject2"
的吸气器上0x10b5a0efc <Prototypes.Timelineview.LastselectedObject2.getter : Prototypes.DisplayedObject+12>: movq 0x76215(%rip), %rax ; direct field offset for Prototypes.Timelineview.LastselectedObject2
强制使用以下代码:
println("touchesBegan at start . LastObject :" + self.timelineview.LastselectedObject2.sTitle);
LastselectedObject2在timelineview类中定义:
class Timelineview: UIView {
var LastselectedObject2:DisplayedObject;
...
...
Class DisplayedObject如下所示:
class DisplayedObject: NSObject, NSCopying {
var iType:Int = 0; // 0 = Phase ; 1 = Event
var X1:Int = 0;
var Y1:Int = 0;
var X2:Int = 0;
var Y2:Int = 0;
var sWikiID:String = "";
var sTitle:String = "";
var sImage:String = "";
var bclickable:Bool = true;
func copyWithZone(zone: NSZone) -> AnyObject {
let a=DisplayedObject(iType: iType, X1: X1, Y1: Y1, X2: X2, Y2: Y2, sWikiID: sWikiID, sTitle: sTitle, sImage: sImage, bclickable: bclickable);
//let theCopy = self.dynamicType(iType: iType, X1: X1, Y1: Y1, X2: X2, Y2: Y2, sWikiID: sWikiID, sTitle: sTitle, sImage: sImage, bclickable: bclickable);
//theCopy.color = self.color
return a
//return DisplayedObject();
}
override init(){
//self.iType=iType;
}
init(iType:Int, X1:Int,Y1:Int,X2:Int,Y2:Int, sWikiID:String, sTitle:String, sImage:String, bclickable:Bool){
self.iType=iType;
self.X1=X1;
self.Y1=Y1;
self.X2=X2;
self.Y2=Y2;
self.sWikiID=sWikiID;
self.sTitle=sTitle;
self.sImage=sImage;
self.bclickable=bclickable;
}
func empty(){
X1 = 0;
iType = 0; // 0 = Phase ; 1 = Event
X1 = 0;
Y1 = 0;
X2 = 0;
Y2 = 0;
sWikiID = "";
sTitle = "";
sImage = "";
}
}
答案 0 :(得分:0)
我遇到类似Core Data对象的问题,请参阅我的帖子:Swift: Breakpoint in CoreData Library
尝试让课程对目标C可见:
@objc(DisplayedObject)
class DisplayedObject: NSObject, NSCopying {
...
}