Questions tagged [superview]
137 questions
0
votes
1 answer
How can I get frame of superview's frame in swift?
I want to create multiple buttons and position it inside uiview and fit to uiview.(as picture)
I need to get uiview frame to calculate and divide as I need , to set button's width and height depending on device size.
for row in 0 ..< 4 {
…

alphonse
- 687
- 1
- 6
- 16
0
votes
1 answer
How to change superview of uiscrollview?
i have a big uiscrollview and topView in ipad viewcontroller,
leftscrollView and topView.
there are child scrollviews in leftScrollView.
i want to move a childscrollview into topView .
i couldnt cahnge the superview. it says its readonly.
how can i…

fulberto100
- 313
- 5
- 23
0
votes
0 answers
UIImage position on screen/window/superview
I want to add a UIButton to the end of NSAttributedString. I was unable to do that as NSAttachment only takes a UIImage.
So, I've added a UIImage to NSAttributedString as attachment and saved its reference. Now i want to obtain the position of this…

Haseeb Iqbal
- 1,455
- 13
- 20
0
votes
2 answers
How can i find the superview/parentviewcontroller of a view inside a stackview
Hopefully this isn't too confusing.
I have a main view controller (MainView) with a stackview at the bottom of the view and inside the stackview I have three views. Inside one the views (lets call it footerView) i'm adding a little tooltipView - and…

vanilla_splsh
- 153
- 1
- 12
0
votes
1 answer
Get center of tableviewCell within coordinate system of superview of tableview
You can get the center point of a cell within the coordinates of its superview or tableView using:
CGPoint center = cell.center;
If the tableview's superview is a UIView, how do you get the cell's center point within the coordinates of the…

user1904273
- 4,562
- 11
- 45
- 96
0
votes
1 answer
What is superView in this case? (Tabbar APP)
I have a tabbar app with only 1 tab.
Here is my didFinishLaunchingWithOptions:
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
OneDayViewController *oneDayView =…

Mun
- 1
0
votes
1 answer
manual constraints not being cuasin unwrapping issue (swift4)
My code below is causing a run time error. This works If I code a lazy var as a scrollview. But this does not work if I am just trying to add a object to the view or superview. I have connected nothing from the storyboard and do not want to.
var…
user10764035
0
votes
1 answer
How to access function variable and remove it from superview?
I have created a function where if you type more than four characters , textField displays an image at the corner with a green tick but when I remove all the characters inside textField , it displays an error message but I want to remove that green…

Noob in Swift
- 113
- 1
- 12
0
votes
1 answer
How can I remove a button from a Screen using Ruby Motion
I can manage to remove an image
def remove_image
@button_image.removeFromSuperview
end
But what script works in order to remove a button?

danielo 007
- 25
- 6
0
votes
1 answer
IOS swift how can I Check between remove super view or dismissing it in subviews
I have a dilemma that I can not seem to solve correctly . I have a Main_Page then different subviews such as Menu_Subview and Profile_Subview . My issue is that I do not know whether to use Dismiss or remove fromsuperview and that is leading to the…

Rome Torres
- 1,061
- 2
- 13
- 27
0
votes
2 answers
How do you programmatically create a view and set it's frame according to superview? (iphone)
I'm totally lost with superview, loadView(), viewDidLoad(), viewWillAppear().
Eventually, I want to set my controller's frame to superview's bounds and utilize [self.view bounds] at my viewDidLoad(). (maybe this is impossible?)
here's the code…

eugene
- 39,839
- 68
- 255
- 489
0
votes
1 answer
Can't remove subview?
This is about a web browser.
I have a custom Class that handles the webpages.
SNBrowserView
SNBrowserViewPage
SNBrowserViewPages have two objects.
WKWebView
UIImageView // Snapshot of the WKWebView
A function either sustains or recovers a page for…

Vulkan
- 1,004
- 16
- 44
0
votes
1 answer
IOS: Disable scroll of a superview in IOS
All I am working on a legacy code that does the following
creates a child view controller and add's it to the parent controller
The child view controller is presented in the parent VC. So the animation starts from bottom towards the top, but only…

Kartik
- 2,541
- 2
- 37
- 59
0
votes
1 answer
Center UIView in center of MainScreen Despite Location of Superview
I have a uiview which can be dragged around. In that UIView I have a subview which I want to be centered on the device screen both height and width. But what ever I try it centers the superview. How can I make it that the subview is always at the…

TheHellOTrofasdasd
- 153
- 1
- 8
0
votes
0 answers
How do I add contstraints automatically
I come from front-end development, when I create div it automatically displays itself in top, after second one it will display itself below the first one, and so...
I want to be able to do the same with swift UIViews, I've created some views and…

nikagar4
- 830
- 4
- 11
- 23