R
R
Rocknglory2014-08-26 16:39:57
iPhone
Rocknglory, 2014-08-26 16:39:57

Are there iOS interface helpers?

Good afternoon, I write applications for iOS and have already been tormented with the adjustment of visual elements (a huge part of my code looks something like

CGRect imageFrame = self.trainImage.frame;
    imageFrame.size.height = newHeight;
    imageFrame.origin.y = self.greyView.frame.size.height+5;
    [self.trainImage setFrame:imageFrame];
    
    CGRect disvF = [self.downImageSeparatorView frame];
    disvF.origin.y = self.trainImage.frame.origin.y + self.trainImage.frame.size.height;
    [self.downImageSeparatorView setFrame:disvF];

)
This is due to the fact that pictures are loaded in the application and you have to adjust the underlying elements to the height of the picture. Is there a way to solve the tuning issue without creating a huge pile of code? The task at me not unique, really nobody solved it? A google search turned up no results.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
MagoVinch, 2014-08-26
@Rocknglory

look at auto layouts, they are designed for this

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question