I work in an application IOSwhere all the work is done programmatically, and we have not used autolayoutin the full application.
IOS
autolayout
But for a long time I ran into one problem: when I got a call or my hot spot is on, in this case the height of the status bar of the device changes.
So, in this case, I can control the application frameto control mine UIView's.
frame
UIView's
Thanks in advance.
A good way is to correctly define representations and subqueries using code (in your case).
AppDelegate.m:
-(void)application:(UIApplication *)application didChangeStatusBarFrame (CGRect)oldStatusBarFrame { // update layout }
.
:
view.autoresizingMask = UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleTopMargin | UIViewAutoresizingFlexibleBottomMargin;
, , . AppDelegate.m . , . , .
AppDelegate.m
//Called before the change - (void)application:(UIApplication *)application willChangeStatusBarFrame:(CGRect)newStatusBarFrame { //Change the size of Window self.window.frame = CGRectMake(0.0f, 60.0f, 200.0f, 200.0f); //In your case it will be //self.window.frame = CGRectMake(0.0f, 40.0f, self.window.frame.size.width, self.window.frame.size.height - 40); } //Called after the change //- (void)application:(UIApplication *)application didChangeStatusBarFrame:(CGRect)oldStatusBarFrame{ //Change the size of Window //}
. .
Source: https://habr.com/ru/post/1673689/More articles:Pandas dataframe format for json - jsonHow to check positional notes of notes in format strings using msgfmt? - c ++Is it wise to sync a local variable? - javahttps://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1673687/event-data-always-seems-to-be-null-on-onwrite&usg=ALkJrhhnEBJxz5k6boGrLtneW2_2Tlxa5Aquestions about pandas.to_sql - pandasAngular Translation sometimes not translated with one-time binding - javascriptКак добавить флаг -l "(ell) компилятора в CMake - c++How could the end user access the generated Sphinx documentation for the Python package? - pythonStart Failed: Internal error starting Android Studio on ubuntu - androidScrollmagic TimelineMax not animating - javascriptAll Articles