Property cannot be found on forward class object?

前端 未结 2 534
日久生厌
日久生厌 2020-12-14 06:16

I have a UIView and I\'m trying to set its layer properties.

self.colorSwatch = [[UIView alloc] initWithFrame:CGRectMake(400, 150, 100, 100)];
self.colorSwat         


        
2条回答
  •  孤街浪徒
    2020-12-14 06:53

    You need to import the file #import < QuartzCore/QuartzCore.h> in ViewController.m class if and only if xcode version is less than 5.

    See if you are using xcode version 5 or latest than that then not required to import .It is automatically included.

提交回复
热议问题