项目中遇到的error and warning记录

@property(nonatomic,strong)  idplayingTimeObserver;

 self.playingTimeObserver = nil;  //Null passed to a callee that requires a non-null argument

Null passed to a callee that requires a non-null argument

将空值传给一个要求不能为空的属性

@property(nonatomic, strong) __nullable id playingTimeObserver;

解决办法:使用__nullable(可为空的)修饰

 AVPlayerItem was deallocated while key value observers were still registered with it. 

[Warning] Warning once only: Detected a case where constraints ambiguously suggest a height of zero for a tableview cell's content view. We're considering the collapse unintentional and using standard height instead.

使用xib创建的cell,设置高度的代理,使用:

            self.discussTBView.estimatedRowHeight = 85;

            self.discussTBView.rowHeight = UITableViewAutomaticDimension;

            returnself.discussTBView.rowHeight;

出现以上警告,并且cell的高度打印出来为-1

出现原因和解决方法:由于在设置cell子控件的约束时候,最靠bottom的子控件没有设置约束导致这个警告,设置警告一定要把父控件撑起来,前后左右都需要有。

你可能感兴趣的:(项目中遇到的error and warning记录)