300x250 UIGraphicsBeginImageContextWithOptions1 Extension 파일 생성 1. cocoa touch로 new file 2. extenstion 하려는 Subclass 선택 후 class명 작성 이렇게 하면 지정한 class명으로 .h와 .m 파일이 생성됨 // .h #import NS_ASSUME_NONNULL_BEGIN @interface 클래스명 : sub클래스 @end NS_ASSUME_NONNULL_END // .m #import "클래스명.h" @implementation CustomMarker @end UIView Extension 예제 - custom drawing imgae 생성 시 // .h NS_ASSUME_NONNULL_BEGIN @interface CustomImage : UIView - (UIImage*) createImage; @end .. 2022. 4. 25. 이전 1 다음 300x250