Http://www.cnblogs.com/onechen/p/4523431.html
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 Basemap Fill.Bitmap.Bitmap
- Set Fill.Bitmap.WrapMode = Titlestretch
- Set fill.kind = Bitmap
- Set fullscreen = True
- Set BorderStyle = Toolwindows. (Use to modify the source code, let the designated as Toolwindows to show the transparency effect)
- Need to modify the source FMX. Platform.iOS.pas
Support for IOS 5.x
In the same way 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:
function Tplatformcocoatouch.calculateformviewframe (const aform:tcommoncustomform): Nsrect;var Orientation: Nsuinteger; Statusbarheight:single; Tmp:single;begin if Ispopupform (aform) then Result: = CGRectMake (Aform.left, Aform.top, Aform.width, Aform.height) else begin Result: = fmainscreen.bounds; Statusbarheight: = 0; {+++>}//Add the following code if Aform.borderstyle = Tfmxformborderstyle.toolwindow then begin Statusbarheight: = 0; Fstatusbarheight: = 0; Result.origin: = Cgpointmake (0, 0); End Else{<+++}//Add the above code if Aform.borderstyle <> tfmxformborderstyle.none then begin ... A little ... end;
Status bar Lower Line (2015/12/15 supplement):
Currently, a line appears below the status bar for some real machines, see:
Measured cable: iphone 6s Plus (only the real machine can see), (no other line, such as: IPad Mini 2, iphone 4, iphone 4s)
The problem causes: not clear, guess should be the problem of Delphi (if you care about this problem, please submit your own QC).
Temporary Solutions :
- Set Form.transparency to True
- Put a trectangle in the Form.
- Rectangle1.align set to Contents
- Rectangle1.Stroke.Kind set to None
- Rectangle1.Fill.Color set to $FFFEFEFE
- Rectangle1.hittest set to False
- Set the above, publish to the real machine, the line below the status bar is not visible.
Several effects of the XE8 for IOS status bar