채워진 사각형을 내 viewController 뷰에 그려야합니다. 아래 코드를 viewDidLoad에 썼습니다. 그러나 변화가 없습니다. 무엇이 잘못 되었나요?직사각형을 그리는 방법?
CGRect rectangle = CGRectMake(0, 100, 320, 100);
CGContextRef context = UIGraphicsGetCurrentContext();
CGContextSetRGBFillColor(context, 1.0, 0.0, 0.0, 1.0);
CGContextSetRGBStrokeColor(context, 1.0, 0.0, 0.0, 1.0);
CGContextFillRect(context, rectangle);
여기 ** 매우 오래된 질문 **에 대해, 정답은 2018 – Fattie