skip to Main Content

Xcode – SwiftUI center items in LazyVGrid

I am new to SwiftUI and am trying to center elements inside the LazyVGrid View. Here is what I have currently: Using: var body: some View { ZStack { Color(red: 75/255, green: 0, blue: 130/255).ignoresSafeArea() VStack { LazyVGrid(columns: [GridItem(.adaptive(minimum: 30))],…

VIEW QUESTION

Xcode – didAddSubview not being called

my didAddSubview is not being called. This is what I am doing. In my viewController - (void)viewDidLoad { [super viewDidLoad]; SomeView *view = [[SomeView alloc] initWithFrame:CGRectMake(0.0, 0.0, CGRectGetWidth(self.view.frame), CGRectGetHeight(self.view.frame))]; [self.view addSubview:view]; } Where my SomeView is a UI view (.h…

VIEW QUESTION
Back To Top
Search