XE8 implements several effects of the IOS status bar:
First, the status bar background:
- Open a new project.
- Sets the Fill.color color property.
- Set fill.kind = Solid.
- No need to modify any official source code.
Second, hide the status bar (full screen):
- Open a new project.
- Set Borderstyoe = None.
- No need to modify any official source code.
Three, transparent status bar (can see BASEMAP):
- Open a new project.
- Set the Basemap Fill.Bitmap.Bitmap.
- Set Fill.Bitmap.WrapMode = Titlestretch.
- Set fill.kind = Bitmap.
- Set BorderStyle = Toolwindows. (Use to set this to show the transparency effect, see the source modification below)
- Need FMX. Platform.iOS.pas source code.
IOS 5.x is the same as above, just add one more setting:
Project > Options > Version Info (Press the right mouse button on the table to increase)
| Key |
Value |
| Uistatusbarstyle |
Uistatusbarstyleblacktranslucent |
Modification Method:
Please make the source FMX. Platform.iOS.pas Copy to your project directory and make changes.
Locate Tplatformcocoatouch.calculateformviewframe to add the following code:
functionTplatformcocoatouch.calculateformviewframe (Constaform:tcommoncustomform): Nsrect;varOrientation:nsuinteger; Statusbarheight:single; Tmp:single;begin ifIspopupform (Aform) ThenResult:=CGRectMake (Aform.left, Aform.top, Aform.width, Aform.height)Else beginResult:=Fmainscreen.bounds; Statusbarheight:=0;{+++>} //Add the following code ifAform.borderstyle = Tfmxformborderstyle.toolwindow Then beginStatusbarheight:=0; Fstatusbarheight:=0; Result.origin:= Cgpointmake (0,0); End Else{<+++} //Add the above code ifAform.borderstyle <> Tfmxformborderstyle.none Then begin... A little ...End;
Several effects of the XE8 for IOS status bar