All Questions
Tagged with objective-c uiviewcontroller
5,200
questions
-1
votes
1
answer
91
views
UIViewController.presentModalViewController hangs indefinitely
I have 3 view controllers, VC1, VC2, and VC3, that are instantiated when the app starts.
I want to present them modally in a loop, like this:
VC1 -> VC2 -> VC3 -> VC1
On each view controller,...
0
votes
1
answer
105
views
Using modal view frame size in subview layout constraints
Problem: I am having some issues using the correct frame values to simulate viewport percentages when sizing subviews of a modal view-controller. I would rather size subviews using layout constraints ...
1
vote
2
answers
671
views
Inconsistent behavior in viewDidAppear Objective C
[ViewController] Calling -viewDidAppear: directly on a view controller is not supported, and may result in out-of-order callbacks and other inconsistent behavior. Use the -beginAppearanceTransition:...
-2
votes
1
answer
26
views
iOS / ObjectiveC: I try to open a viewcontroller with an imageview containing a local image, but it displays a white page
I precise that when I use the debugger, I can see the image in the image view.
Why it displays a white page ? (I can see the back button)
- (void) openIMAGE:(NSIndexPath *) indexPath
{
NSString *...
0
votes
2
answers
85
views
can I use uiview as viewcontroller?
I have a uiviewcontroller, it's view has 4 subviews, they don't need communication but need many user interaction and have many many content , but they need many network request to fetch data and ...
0
votes
1
answer
27
views
Objective-C equivalent of simple Swift video player does not show video
I'm creating a simple storyboard that plays an mp4 video. This works as expected in Swift, but when I try to do the exact same thing in Objective-C nothing happens.
Can anyone see if I'm doing ...
1
vote
1
answer
786
views
Calling UIViewController dismiss and/or present in an async context?
According to Calling Objective-C APIs Asynchronously methods imported from Objective-C that meet certain requirements are "imported as two methods", where one is async instead of having a ...
0
votes
0
answers
47
views
How do I instantiate Storyboard ViewController? [duplicate]
I have objc code (SUOTAViewController) that I am including in my Swift project. I also have a storyboard associated with that ViewController with the storyboardID "suotaViewController".
When ...
0
votes
1
answer
184
views
"Cancel" button (UIBarButtonItem) not working in iOS view controller
I am trying to add a "Cancel" button in my viewcontroller's navigation bar programmatically. The sole purpose of the button is to dismiss the current viewcontroller and go back to the root ...
2
votes
1
answer
580
views
`isMovingToParentViewController`/`isMovingToParent` incorrectly true
In my view controller, I am checking for isMovingToParent inside viewWillAppear so that I can execute some logic only when the view controller is first displayed and not when a later view controller ...
1
vote
1
answer
1k
views
How to make UISheetPresentationController prefersGrabberVisible follow light/dark mode?
In setting UISheetPresentationController's prefersGrabberVisible to true, our app successfully displays the grabber handle at the top of modal view controllers.
However, the grabber is always in the ...
0
votes
2
answers
714
views
iOS - Pass Data from Swift to ObjC VC using protocol and delegate
I am trying to pass data back from Swift VC2 to ObjC VC1 using delegates while dismiss, below is my code.
VC2 (swift)
//protocol used for sending data back
@objc protocol DataEnteredDelegate: ...
1
vote
1
answer
972
views
How can I get the actual size of a UIVIewController view open modally?
I'm opening a view controller modally and on the ViewDidLoad of the UIViewController that has been opened modally I need to know its width and height.
This became a problem when I tested on a iPad 12....
1
vote
1
answer
70
views
Objective c didSelectRowIndexPath - Passing data to other View Controller
Hi there i am trying to pass the data from my TableViewController_My_boards to ViewController_Update_Boards but i am not sure how to do it
So first of all i create a dictionary with the data from ...
0
votes
1
answer
296
views
difference between function with @objc in front and function doesn't have @objc
In one of the view controller files in my project, there are two functions, one is called in viewdidload and another is called by Notification and observers. Those functions do exactly the same thing, ...