Xcode not recognizing CGFloat / UIFont / CGSize while using Objective-C with Swift December 8, 2023 by Tarik just Add this in which you are facing error #import <UIKit/UIKit.h>