1
어떻게 CALayer를 서브 클래스 화하여 스타일 속성이 이미 설정된 레이어를 반환합니까?CALayer를 서브 클래 싱하여 프리 스타일 레이어를 반환하려면 어떻게해야합니까?
그래서를 :
MyCustomLayer *layer = [MyCustomLayer layer];
이러한 특성을 가진 레이어를 만들 것이다;
layer.backgroundColor = sweetBackgroundColor.CGColor;
layer.borderColor = sweetBorderColor.CGColor;
layer.borderWidth = 2.0;
layer.cornerRadius = 8.0;
프레임을 설정하여 트리에 추가 할 수 있습니다.
하지만 제 질문은 실제로 어떻게 될지도 모릅니다. 개체를 서브 클래 싱하여 속성이 이미 생성시 설정되어있는 방법은 무엇일까요? 가능한?