I have an activity view that I have added in AppDelegate class to tap bar:
[self.mainTabBar.view addSubview: spinner];
When there are connection problems it is visible in each view controller and is spinning. There is some button at certain view controller, makes to present some modal view controller. That modal view controller overlaps the spinner. How to make that spinner always be on top of all views or at least on top of that modal view controller? I tried to make such a thing in view controller that presents modal view controller:
[self presentModalViewController:selectionViewController animated:YES]; [self.view bringSubviewToFront:[self.tabBarController.view viewWithTag:15]];
Not works.
Go to StoryBoard select subViewController and add a UIView in it. for all sides and change its color to black with the alpha you want. Set its height constraint to equal height with superview(self. View) and change its multipler to 0.33 or 0.34.
You may also start segues from table rows and collection view cells. Right-click the control or object in your current view controller. Drag the cursor to the view controller you want to present. Select the kind of segue you want from the list that Xcode provides.
Add the view to the main window.
UIWindow* mainWindow = [[UIApplication sharedApplication] keyWindow]; [mainWindow addSubview: spinner];
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With