zoukankan      html  css  js  c++  java
  • [调整] Firemonkey iOS 原生 Edit 透明框, 改变框色

    说明:iOS 原生 Edit 透明框

    适用:Berlin Firemonkey

    方法:在 StyleLookup 输入 transparentedit

    效果:

    如果有图片 Image 在这二个 Edit 的上方,效果如下:

    说明:iOS 原生 Edit 设定框色

    适用:Berlin Firemonkey

    代码修改说明:

    1. 请将源码 FMX.Edit.iOS.pas 复制到自己的工程目录里,再进行修改。
    2. 代码内 {+++> 代表我增加的代码
    3. 代码内 {---> 代表我删除的代码
    4. 未来新版 Delphi 可以自己将 {+++> {---> 移植到新版代码内
    constructor TiOSNativeEdit.Create;
    begin
      inherited;
      FTextFieldDelegate := TiOSTextFieldDelegate.Create(Self);
      View.setExclusiveTouch(True);
      View.setBorderStyle(UITextBorderStyleRoundedRect);
    {+++>}
      // by Aone
      View.layer.setBorderColor(TUIColor.Wrap(TUIColor.OCClass.whiteColor).CGColor); // 白色
      View.layer.setCornerRadius(0);
      View.layer.setBorderWidth(2);
    {<+++}
      View.setDelegate((FTextFieldDelegate as ILocalObject).GetObjectID);
      FPreviousSelection := NSMakeRange(NSNotFound, NSNotFound);
    
      RegisterNativeEventHandler('ControlEventEditingChanged', UIControlEventEditingChanged);
      RegisterNativeEventHandler('ControlEventEditingDidEnd', UIControlEventEditingDidEnd);
    end;

    效果:

  • 相关阅读:
    深入理解计算机系统 第七章
    第七周 可执行程序的卸载
    Linux内核设计与实现 第三章
    第六周 进程的描述和进程的创建
    第五周 扒开系统调用的三层皮(下)
    UIWebView和Js交互
    CocoaPods的版本升级
    ios图片添加文字或者水印
    Objective-C 关联
    NSString进行urlencode编码
  • 原文地址:https://www.cnblogs.com/onechen/p/5823261.html
Copyright © 2011-2022 走看看