Post

Replies

Boosts

Views

Activity

Reply to How to display a interface for the view with Objective-C ?
Here is the code that I'm trying to develop to make the paymant button visible : // //  ViewController.m //  Geaba // //  Created by Besleaga Alexandru Marian on 9/29/21. // #import "ViewController.h" @interface ViewController () @end @implementation ViewController - (void)viewDidLoad {     [super viewDidLoad];     // Do any additional setup after loading the view. } @end @interface NSResponder : NSObject @end @interface NSView : NSResponder @end @interface NSControl : NSView @end @interface NSButton : NSControl @end typedef enum PKPaymentButtonStyle : NSInteger {          PKPaymentButtonStyleWhite = 0      } PKPaymentButtonStyle; typedef enum PKPaymentButtonType : NSInteger {          PKPaymentButtonTypePlain = 0      } PKPaymentButtonType; @interface PKPaymentButton : NSButton + (instancetype)buttonWithType:(PKPaymentButtonType)buttonType                          style:(PKPaymentButtonStyle)buttonStyle; @end My problem is that I want to program the button with no storyboard, I'm trying to create a programmable interface and I can't seam to manage the result to create the first visible interface on screen. Do you know how to help me ?
Sep ’21
Reply to Application Error ?
// //  main.m //  Hostile // //  Created by Besleaga Alexandru Marian on 10/20/21. // //  #import <Cocoa/Cocoa.h> @interface NSObject @end @interface NSResponder : NSObject @end @interface NSEvent : NSObject @end @interface NSView : NSResponder @end @interface NSWindow : NSResponder @end @interface NSApplication : NSResponder @property(class, readonly, strong) __kindof NSApplication *sharedApplication; - (void)run; - (void)stop:(id)sender; - (void)terminate:(id)sender; - (void)sendEvent:(NSEvent *)event; @end typedef int *NSApp; int NSApplicationMain(int argc, const char * _Nonnull *argv); int main(int argc, const char * argv[]) {     @autoreleasepool {         // Setup code that might create autoreleased objects goes here.     }     return NSApplicationMain(argc, argv); } My questions is the following : If I have a Main file, I want to remove the Main file and see the NSWindow the Window on the display from the code that I'm programming. Where should I search in the documentation to solve these issue ?
Oct ’21