主頁 > 移動端開發 > Flutter 專案實戰 編輯框(TextField) 自定義 七

Flutter 專案實戰 編輯框(TextField) 自定義 七

2022-01-04 10:10:57 移動端開發

/ 應用編輯框你體驗過嗎? /

從各大應用市場下載的應用安裝完成后觸發打開應用的那一刻, 我們可能直接進入app進行查看app的功能模塊或者一開始就需要我們進行登錄操作才能進入app . 當進入app查看功能模塊時我們需要通過app快速查找對應的資訊 , 這時我們需要通過編輯框進行搜索 . 對編輯框進行編輯的時候可能是通過手機軟鍵盤一個字符一個字符的輸入到編輯框, 或者是直接從其它地方復制的文本到編輯框進行粘貼 , 搜索完成后切換成其它需要搜索的資訊時又需要快速洗掉再次快速編輯輸入框 . 不難發現一個簡單的編輯框是否做得好,直接影響了用戶的體驗 , 作為開發者最關系的是否能給用戶帶來好的體驗 .

自定義編輯框需要實作的幾個功能

/ Material Design TextField /

TextEditingController? controller

對輸入編輯框的文本進行控制 (例如 : 替換空格、一鍵洗掉文本、獲取編輯的值 等....)

TextEditingController 初始化在initState里面完成

  TextEditingController? _controller;
  VoidCallback? _conListener;

  @override
  void initState() {
    super.initState();
    _controller = TextEditingController();
    _conListener = () {
      print('編輯輸入的值:' + _controller!.text);
    };
    _controller!.addListener(_conListener!);
  }

編輯框構建 build

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text(widget.title),
      ),
      body: Center(
        child: Row(
          children: [
            Expanded(
              child: TextField(
                controller: _controller,
              ),
              flex: 1,
            ),
            GestureDetector(
              onTap: () {
                _controller!.clear();
              },
              child: Container(
                padding: EdgeInsets.all(10.0),
                color: Colors.blue,
                child: Text('清除編輯框的文本'),
              ),
            )
          ],
        ),
      ),
    );
  }

編輯框控制器銷毀

  @override
  void dispose() {
    // TODO: implement dispose
    _controller!.clear();
    _controller!.removeListener(_conListener!);
    _controller!.dispose();
    _controller = null;
    super.dispose();
  }
輸入文本到編輯框
I/flutter ( 1091): 編輯輸入的值:我
I/flutter ( 1091): 編輯輸入的值:我已經
I/flutter ( 1091): 編輯輸入的值:我已經輸入值
I/flutter ( 1091): 編輯輸入的值:我已經輸入值到
I/flutter ( 1091): 編輯輸入的值:我已經輸入值到編輯框
I/flutter ( 1091): 編輯輸入的值:我已經輸入值到編輯框了
點擊清除編輯框文本
I/flutter ( 1091): 編輯輸入的值:

FocusNode? focusNode

編輯框輸入獲取或失去焦點監聽 . 編輯框首次顯示輸入游標時默認為沒有獲取焦點 , 當進行了輸入操作后就等同于獲取了焦點 .

 ///編輯框獲取或者失去焦點監聽
  VoidCallback? _focusNodeListener;
  FocusNode _focusNode = FocusNode();

  @override
  void initState() {
    super.initState();

    _controller = TextEditingController();
    _conListener = () {
      print('編輯輸入的值:' + _controller!.text);
    };
    _controller!.addListener(_conListener!);


    _focusNodeListener = () {
      print('編輯框是否獲取焦點:${_focusNode.hasFocus}');
    };
    _controller!.addListener(_focusNodeListener!);
  }
TextField(
    controller: _controller,
    focusNode: _focusNode,
),

編輯框首次顯示輸入游標時默認為沒有獲取焦點

I/flutter ( 8761): 編輯輸入的值:
I/flutter ( 8761): 編輯框是否獲取焦點:false
W/IInputConnectionWrapper( 8761): getSelectedText on inactive InputConnection
W/IInputConnectionWrapper( 8761): getTextAfterCursor on inactive InputConnection
W/IInputConnectionWrapper( 8761): getTextBeforeCursor on inactive InputConnection
W/IInputConnectionWrapper( 8761): getTextAfterCursor on inactive InputConnection

編輯框輸入文本或者洗掉文本后

I/flutter ( 8761): 編輯輸入的值:我正在
I/flutter ( 8761): 編輯框是否獲取焦點:true
I/flutter ( 8761): 編輯輸入的值:我正在向
I/flutter ( 8761): 編輯框是否獲取焦點:true
I/flutter ( 8761): 編輯輸入的值:我正在向編輯框
I/flutter ( 8761): 編輯框是否獲取焦點:true
I/flutter ( 8761): 編輯輸入的值:我正在向編輯框輸入
I/flutter ( 8761): 編輯框是否獲取焦點:true
I/flutter ( 8761): 編輯輸入的值:我正在向編輯框輸入值

InputDecoration? decoration

自定義編輯框樣式 (圖示、label、提示文本、錯誤文本、獲取焦點文本顏色、失去焦點文本顏色、字體樣式、邊框等.......)

InputDecoration({
    this.icon,    //位于裝飾器外部和輸入框前面的圖片
    this.labelText,  //用于描述輸入框,例如這個輸入框是用來輸入用戶名還是密碼的,當輸入框獲取焦點時默認會浮動到上方,
    this.labelStyle,  // 控制labelText的樣式,接收一個TextStyle型別的值
    this.helperText, //輔助文本,位于輸入框下方,如果errorText不為空的話,則helperText不會顯示
    this.helperStyle, //helperText的樣式
    this.hintText,  //提示文本,位于輸入框內部
    this.hintStyle, //hintText的樣式
    this.hintMaxLines, //提示資訊最大行數
    this.errorText,  //錯誤資訊提示
    this.errorStyle, //errorText的樣式
    this.errorMaxLines,   //errorText最大行數
    this.hasFloatingPlaceholder = true,  //labelText是否浮動,默認為true,修改為false則labelText在輸入框獲取焦點時不會浮動且不顯示
    this.isDense,   //改變輸入框是否為密集型,默認為false,修改為true時,圖示及間距會變小
    this.contentPadding, //內間距
    this.prefixIcon,  //位于輸入框內部起始位置的圖示,
    this.prefix,   //預先填充的Widget,跟prefixText同時只能出現一個
    this.prefixText,  //預填充的文本,例如手機號前面預先加上區號等
    this.prefixStyle,  //prefixText的樣式
    this.suffixIcon, //位于輸入框后面的圖片,例如一般輸入框后面會有個眼睛,控制輸入內容是否明文
    this.suffix,  //位于輸入框尾部的控制元件,同樣的不能和suffixText同時使用
    this.suffixText,//位于尾部的填充文字
    this.suffixStyle,  //suffixText的樣式
    this.counter,//位于輸入框右下方的小控制元件,不能和counterText同時使用
    this.counterText,//位于右下方顯示的文本,常用于顯示輸入的字符數量
    this.counterStyle, //counterText的樣式
    this.filled,  //如果為true,則輸入使用fillColor指定的顏色填充
    this.fillColor,  //相當于輸入框的背景顏色
    this.errorBorder,   //errorText不為空,輸入框沒有焦點時要顯示的邊框
    this.focusedBorder,  //輸入框有焦點時的邊框,如果errorText不為空的話,該屬性無效
    this.focusedErrorBorder,  //errorText不為空時,輸入框有焦點時的邊框
    this.disabledBorder,  //輸入框禁用時顯示的邊框,如果errorText不為空的話,該屬性無效
    this.enabledBorder,  //輸入框可用時顯示的邊框,如果errorText不為空的話,該屬性無效
    this.border, //正常情況下的border
    this.enabled = true,  //輸入框是否可用
    this.semanticCounterText,  
    this.alignLabelWithHint,
  })
decoration: const InputDecoration(
                  icon: Icon(Icons.message),),
icon 編輯框前面圖示
InputDecoration( labelText: '編輯框頂部提示文本' ),
labelText
InputDecoration(
labelText: '編輯框頂部提示文本',
labelStyle: TextStyle(color: Colors.red, fontSize: 14.0)),
labelTextStyle

InputDecoration(
helperText: '編輯框底部提示文本',
helperStyle: TextStyle(color: Colors.red, fontSize: 14.0))
helperText / helperStyle

編輯框底部提示文本行數(顯示1行或者多行,如果文本值超過一行顯示省略號)

InputDecoration(
helperMaxLines: 1,
helperText: '編輯框底部提示文本/編輯框底部提示文本/編輯框底部提示文本/編輯框底部提示文本/編輯框底部提示文本',
helperStyle: TextStyle(color: Colors.red, fontSize: 14.0))
helperMaxLines

InputDecoration(
hintMaxLines: 1,
hintText: '編輯框內提示文本/編輯框內提示文本/編輯框內提示文本/編輯框內提示文本',
hintTextDirection: TextDirection.rtl,
hintStyle: TextStyle(color: Colors.red, fontSize: 14.0))
hintText / hintStyle / hintTextDirection / hintMaxLines

InputDecoration(
errorMaxLines: 1,
errorText: '編輯框錯誤文本提示一',
errorBorder: UnderlineInputBorder(
borderRadius: BorderRadius.all(
   Radius.circular(30), //邊角為30
 ),
borderSide: BorderSide(
 color: Colors.amber, //邊線顏色為黃色
 width: 2, //邊線寬度為2
 ),),
errorStyle: TextStyle(color: Colors.blue, fontSize: 14.0))
errorMaxLines/errorText/errorBorder/errorStyle

TextField(
                    decoration: const InputDecoration(
                        enabledBorder: OutlineInputBorder(
                          borderRadius: BorderRadius.all(
                            Radius.circular(30), //邊角為30
                          ),
                          borderSide: BorderSide(
                            color: Colors.amber, //邊線顏色為紅色
                            width: 2, //邊線寬度為2
                          ),
                        ),
                        focusedBorder: OutlineInputBorder(
                            borderRadius: BorderRadius.all(
                              Radius.circular(30), //邊角為30
                            ),
                            borderSide: BorderSide(
                              color: Colors.green, //邊框顏色為綠色
                              width: 5, //寬度為5
                            ))),
                  ),
enabledBorder/focusedBorder

/ 自定義編輯框 /

編輯框一鍵洗掉

assets檔案夾下放置用來進行一鍵洗掉的圖示

pubspec.yaml 注冊圖示依賴

initState函式里面初始化一鍵洗掉編輯框控制器

//定義一個controller
  late TextEditingController _controller;
  bool _isShoDel = false;

  ///是否獲取焦點
  bool _isFocus = false;

  FocusNode _focusNode = FocusNode();

  @override
  void initState() {
    // TODO: implement initState
    super.initState();
    _controller = TextEditingController();
    _controller.addListener(() {
      _inputContro(_controller.text, false);
    });
    _focusNode.addListener(() {
      print('輸入框是否獲取焦點: ${_focusNode.hasFocus}');
      setState(() {
        _isFocus = _focusNode.hasFocus;
      });
    });
  }

失去焦點或者編輯框不存在文本時 , 一鍵洗掉圖示隱藏

編輯框粘貼需用用到編輯控制器 , 復制文本粘貼到編輯會顯示一鍵洗掉

編輯框輸入文本后并失去焦點 , 一鍵洗掉按鈕隱藏

編輯框輸入完成后替換空格 ,網路請求資料只會上傳除開空格后的文本

編輯框完整編碼

import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';

///自定義編輯
class CusTextField extends StatefulWidget {
  final InputValueCallBack? _inputValueCallBack;

  ///編輯框輸入顏色值
  final inputColorValue;

  ///編輯框默認提示文本
  final hintText;

  ///邊框
  final border;

  ///編輯框最外層邊框
  final bgBorder;

  ///標題
  final Widget? labelText;

  ///編輯框輸入文本大小
  final inputFontSize;

  ///文本位置(左邊|右邊|中間)
  final TextAlign? textAlign;

  final keyboardType;

  //文本行數
  final int? maxLine;

  ///邊框跟父視圖邊距
  final margin;

  CusTextField(this._inputValueCallBack,
      {this.inputColorValue,
      this.hintText = '',
      this.border,
      this.bgBorder,
      this.labelText,
      this.inputFontSize,
      this.textAlign = TextAlign.right,
      this.maxLine = 1,
      this.margin,
      this.keyboardType});

  @override
  _CusTextFieldState createState() => _CusTextFieldState();
}

class _CusTextFieldState extends State<CusTextField> {
  //定義一個controller
  late TextEditingController _controller;
  bool _isShoDel = false;

  ///是否獲取焦點
  bool _isFocus = false;

  FocusNode _focusNode = FocusNode();

  @override
  void initState() {
    // TODO: implement initState
    super.initState();
    _controller = TextEditingController();
    _controller.addListener(() {
      _inputContro(_controller.text, false);
    });
    _focusNode.addListener(() {
      print('輸入框是否獲取焦點: ${_focusNode.hasFocus}');
      setState(() {
        _isFocus = _focusNode.hasFocus;
      });
    });
  }

  @override
  void dispose() {
    // TODO: implement dispose
    super.dispose();
  }

  void _inputContro(v, bool isInput) {
    ///編輯框輸入文本長度
    int _valueLength = '$v'.length;

    print('輸入框輸入監聽 文本長度: $_valueLength');

    ///編輯框輸入文本大于0
    _isShoDel = (_valueLength > 0);

    ///編輯框文本輸入文本存在值時或者等于為空時重繪編輯框
    if (_valueLength <= 1 && isInput) {
      setState(() {});
      print('CusTextField_重繪編輯框');
    }

    ///粘貼
    if (!isInput) {
      setState(() {});
    }
    _inputValue(v);
  }

  @override
  Widget build(BuildContext context) {
    return Container(
      child: Row(
        crossAxisAlignment: CrossAxisAlignment.center,
        children: [
          widget.labelText ?? Container(),
          Expanded(
            flex: 1,
            child: Container(
              child: TextField(
                textAlign: (widget.textAlign)!,
                maxLines: widget.maxLine!,
                focusNode: _focusNode,

                ///游標顏色
                cursorColor: Color(0xff005CFA),

                ///編輯框首次不自動獲取焦點
                autofocus: false,
                keyboardType: widget.keyboardType ?? TextInputType.text,
                style: TextStyle(
                    fontSize: widget.inputFontSize ?? 0.0,
                    fontWeight: FontWeight.w400,

                    ///文本輸入或文本為空時的顏色值
                    color: Color(_isShoDel ? 0xff1D1D1F : 0xffB8BABF)),
                decoration: InputDecoration(
                  ///默認文本
                  hintText: '${widget.hintText ?? ''}',
                  hintStyle: TextStyle(
                    color: Color(0xffB8BABF),
                    fontWeight: FontWeight.w400,
                  ),

                  ///邊框
                  border: widget.border ?? InputBorder.none,
                ),
                onChanged: (v) {
                  _inputContro(v, true);
                },
                controller: _controller, //設定controller
              ),
            ),
          ),
          Offstage(
            offstage: !(_isShoDel && _isFocus),
            child: GestureDetector(
              onTap: () {
                _controller.clear();
                _inputContro('', false);
              },
              child: Container(
                alignment: Alignment.center,
                width: 30.0,
                height: 40.0,
                color: Colors.transparent,
                child: Image.asset('assets/input_delete.png'),
              ),
            ),
          ),
        ],
      ),
      decoration: BoxDecoration(
        ///邊框
        border: widget.bgBorder ?? InputBorder.none,
      ),
      margin: widget.margin ?? EdgeInsets.all(0.0),
    );
  }

  void _inputValue(v) {
    String _curV = '$v'.replaceAll(' ', '');
    print('編輯框輸入的值:$_curV');

    ///編輯框輸入值
    widget._inputValueCallBack!(_curV);
  }
}

///編輯框輸入值
typedef void InputValueCallBack(var inputValue);

bool isEmpty(String? s) {
  return (null == s || "" == s.toString().trim() || "null" == s || '{}' == s);
}

編輯框使用

class TextEditPage extends StatefulWidget {
  TextEditPage({Key? key, required this.title}) : super(key: key);
  final String title;

  @override
  _TextEditPageState createState() => _TextEditPageState();
}

class _TextEditPageState extends State<TextEditPage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text(widget.title),
      ),
      body: Center(
          child: CusTextField((v) {},
              hintText: '編輯框提示文本',
              margin: EdgeInsets.only(left: 10.0, right: 10.0),
              keyboardType: TextInputType.number,
              bgBorder: Border.all(color: Colors.green, width: 1.0),
              textAlign: TextAlign.start,
              inputFontSize: 14.0,
              labelText: Text('\t編輯框標題\t'))),
    );
  }
}

自定義編輯框案例下載

轉載請註明出處,本文鏈接:https://www.uj5u.com/yidong/402781.html

標籤:其他

上一篇:Android開發復用代碼

下一篇:Android 顏色(不)透明度的使用及專案開發中的心得總結

標籤雲
其他(157675) Python(38076) JavaScript(25376) Java(17977) C(15215) 區塊鏈(8255) C#(7972) AI(7469) 爪哇(7425) MySQL(7132) html(6777) 基礎類(6313) sql(6102) 熊猫(6058) PHP(5869) 数组(5741) R(5409) Linux(5327) 反应(5209) 腳本語言(PerlPython)(5129) 非技術區(4971) Android(4554) 数据框(4311) css(4259) 节点.js(4032) C語言(3288) json(3245) 列表(3129) 扑(3119) C++語言(3117) 安卓(2998) 打字稿(2995) VBA(2789) Java相關(2746) 疑難問題(2699) 细绳(2522) 單片機工控(2479) iOS(2429) ASP.NET(2402) MongoDB(2323) 麻木的(2285) 正则表达式(2254) 字典(2211) 循环(2198) 迅速(2185) 擅长(2169) 镖(2155) 功能(1967) .NET技术(1958) Web開發(1951) python-3.x(1918) HtmlCss(1915) 弹簧靴(1913) C++(1909) xml(1889) PostgreSQL(1872) .NETCore(1853) 谷歌表格(1846) Unity3D(1843) for循环(1842)

熱門瀏覽
  • 【從零開始擼一個App】Dagger2

    Dagger2是一個IOC框架,一般用于Android平臺,第一次接觸的朋友,一定會被搞得暈頭轉向。它延續了Java平臺Spring框架代碼碎片化,注解滿天飛的傳統。嘗試將各處代碼片段串聯起來,理清思緒,真不是件容易的事。更不用說還有各版本細微的差別。 與Spring不同的是,Spring是通過反射 ......

    uj5u.com 2020-09-10 06:57:59 more
  • Flutter Weekly Issue 66

    新聞 Flutter 季度調研結果分享 教程 Flutter+FaaS一體化任務編排的思考與設計 詳解Dart中如何通過注解生成代碼 GitHub 用對了嗎?Flutter 團隊分享如何管理大型開源專案 插件 flutter-bubble-tab-indicator A Flutter librar ......

    uj5u.com 2020-09-10 06:58:52 more
  • Proguard 常用規則

    介紹 Proguard 入口,如何查看輸出,如何使用 keep 設定入口以及使用實體,如何配置壓縮,混淆,校驗等規則。

    ......

    uj5u.com 2020-09-10 06:59:00 more
  • Android 開發技術周報 Issue#292

    新聞 Android即將獲得類AirDrop功能:可向附近設備快速分享檔案 谷歌為安卓檔案管理應用引入可安全隱藏資料的Safe Folder功能 Android TV新主界面將顯示電影、電視節目和應用推薦內容 泄露的Android檔案暗示了傳說中的谷歌Pixel 5a與折疊屏新機 谷歌發布Andro ......

    uj5u.com 2020-09-10 07:00:37 more
  • AutoFitTextureView Error inflating class

    報錯: Binary XML file line #0: Binary XML file line #0: Error inflating class xxx.AutoFitTextureView 解決: <com.example.testy2.AutoFitTextureView android: ......

    uj5u.com 2020-09-10 07:00:41 more
  • 根據Uri,Cursor沒有獲取到對應的屬性

    Android: 背景:呼叫攝像頭,拍攝視頻,指定保存的地址,但是回傳的Cursor檔案,只有名稱和大小的屬性,沒有其他諸如時長,連ID屬性都沒有 使用 cursor.getInt(cursor.getColumnIndexOrThrow(MediaStore.Video.Media.DURATIO ......

    uj5u.com 2020-09-10 07:00:44 more
  • Android連載29-持久化技術

    一、持久化技術 我們平時所使用的APP產生的資料,在記憶體中都是瞬時的,會隨著斷電、關機等丟失資料,因此android系統采用了持久化技術,用于存盤這些“瞬時”資料 持久化技術包括:檔案存盤、SharedPreference存盤以及資料庫存盤,還有更復雜的SD卡記憶體儲。 二、檔案存盤 最基本存盤方式, ......

    uj5u.com 2020-09-10 07:00:47 more
  • Android Camera2Video整合到自己專案里

    背景: Android專案里呼叫攝像頭拍攝視頻,原本使用的 MediaStore.ACTION_VIDEO_CAPTURE, 后來因專案需要,改成了camera2 1.Camera2Video 官方demo有點問題,下載后,不能直接整合到專案 問題1.多次拍攝視頻崩潰 問題2.雙擊record按鈕, ......

    uj5u.com 2020-09-10 07:00:50 more
  • Android 開發技術周報 Issue#293

    新聞 谷歌為Android TV開發者提供多種新功能 Android 11將自動填表功能整合到鍵盤輸入建議中 谷歌宣布Android Auto即將支持更多的導航和數字停車應用 谷歌Pixel 5只有XL版本 搭載驍龍765G且將比Pixel 4更便宜 [圖]Wear OS將迎來重磅更新:應用啟動時間 ......

    uj5u.com 2020-09-10 07:01:38 more
  • 海豚星空掃碼投屏 Android 接收端 SDK 集成 六步驟

    掃碼投屏,開放網路,獨占設備,不需要額外下載軟體,微信掃碼,發現設備。支持標準DLNA協議,支持倍速播放。視頻,音頻,圖片投屏。好點意思。還支持自定義基于 DLNA 擴展的操作動作。好像要收費,沒體驗。 這里簡單記錄一下集成程序。 一 跟目錄的build.gradle添加私有mevan倉庫 mave ......

    uj5u.com 2020-09-10 07:01:43 more
最新发布
  • 歡迎頁輪播影片

    如圖,引導開始,球從上落下,同時淡入文字,然后文字開始輪播,最后一頁時停止,點擊進入首頁。 在來看看效果圖。 重力球先不講,主要歡迎輪播簡單實作 首先新建一個類 TextTranslationXGuideView,用于影片展示 文本是類似的,最后會有個圖片箭頭影片,布局很簡單,就是一個 TextVi ......

    uj5u.com 2023-04-20 08:40:31 more
  • 【FAQ】關于華為推送服務因營銷訊息頻次管控導致服務通訊類訊息

    一. 問題描述 使用華為推送服務下發IM訊息時,下發訊息請求成功且code碼為80000000,但是手機總是收不到訊息; 在華為推送自助分析(Beta)平臺查看發現,訊息發送觸發了頻控。 二. 問題原因及背景 2023年1月05日起,華為推送服務對咨詢營銷類訊息做了單個設備每日推送數量上限管理,具體 ......

    uj5u.com 2023-04-20 08:40:11 more
  • 歡迎頁輪播影片

    如圖,引導開始,球從上落下,同時淡入文字,然后文字開始輪播,最后一頁時停止,點擊進入首頁。 在來看看效果圖。 重力球先不講,主要歡迎輪播簡單實作 首先新建一個類 TextTranslationXGuideView,用于影片展示 文本是類似的,最后會有個圖片箭頭影片,布局很簡單,就是一個 TextVi ......

    uj5u.com 2023-04-20 08:39:36 more
  • 【FAQ】關于華為推送服務因營銷訊息頻次管控導致服務通訊類訊息

    一. 問題描述 使用華為推送服務下發IM訊息時,下發訊息請求成功且code碼為80000000,但是手機總是收不到訊息; 在華為推送自助分析(Beta)平臺查看發現,訊息發送觸發了頻控。 二. 問題原因及背景 2023年1月05日起,華為推送服務對咨詢營銷類訊息做了單個設備每日推送數量上限管理,具體 ......

    uj5u.com 2023-04-20 08:39:13 more
  • iOS從UI記憶體地址到讀取成員變數(oc/swift)

    開發除錯時,我們發現bug時常首先是從UI顯示發現例外,下一步才會去定位UI相關連的資料的。XCode有給我們提供一系列debug工具,但是很多人可能還沒有形成一套穩定的除錯流程,因此本文嘗試解決這個問題,順便提出一個暴論:UI顯示例外問題只需要兩個步驟就能完成定位作業的80%: 定位例外 UI 組 ......

    uj5u.com 2023-04-19 09:16:23 more
  • FIDE重磅更新!性能飛躍!體驗有禮!

    FIDE 開發者工具重構升級啦!實作500%性能提升,誠邀體驗! 一直以來不少開發者朋友在社區反饋,在使用 FIDE 工具的程序中,時常會遇到諸如加載不及時、代碼預覽/渲染性能不如意的情況,十分影響開發體驗。 作為技術團隊,我們深知一件趁手的開發工具對開發者的重要性,因此,在2023年開年,FinC ......

    uj5u.com 2023-04-19 09:16:15 more
  • 游戲內嵌社區服務開放,助力開發者提升玩家互動與留存

    華為 HMS Core 游戲內嵌社區服務提供快速訪問華為游戲中心論壇能力,支持玩家直接在游戲內瀏覽帖子和交流互動,助力開發者擴展內容生產和觸達的場景。 一、為什么要游戲內嵌社區? 二、游戲內嵌社區的典型使用場景 1、游戲內打開論壇 您可以在游戲內繪制論壇入口,為玩家提供沉浸式發帖、瀏覽、點贊、回帖、 ......

    uj5u.com 2023-04-19 09:15:46 more
  • iOS從UI記憶體地址到讀取成員變數(oc/swift)

    開發除錯時,我們發現bug時常首先是從UI顯示發現例外,下一步才會去定位UI相關連的資料的。XCode有給我們提供一系列debug工具,但是很多人可能還沒有形成一套穩定的除錯流程,因此本文嘗試解決這個問題,順便提出一個暴論:UI顯示例外問題只需要兩個步驟就能完成定位作業的80%: 定位例外 UI 組 ......

    uj5u.com 2023-04-19 09:14:53 more
  • FIDE重磅更新!性能飛躍!體驗有禮!

    FIDE 開發者工具重構升級啦!實作500%性能提升,誠邀體驗! 一直以來不少開發者朋友在社區反饋,在使用 FIDE 工具的程序中,時常會遇到諸如加載不及時、代碼預覽/渲染性能不如意的情況,十分影響開發體驗。 作為技術團隊,我們深知一件趁手的開發工具對開發者的重要性,因此,在2023年開年,FinC ......

    uj5u.com 2023-04-19 09:14:08 more
  • 游戲內嵌社區服務開放,助力開發者提升玩家互動與留存

    華為 HMS Core 游戲內嵌社區服務提供快速訪問華為游戲中心論壇能力,支持玩家直接在游戲內瀏覽帖子和交流互動,助力開發者擴展內容生產和觸達的場景。 一、為什么要游戲內嵌社區? 二、游戲內嵌社區的典型使用場景 1、游戲內打開論壇 您可以在游戲內繪制論壇入口,為玩家提供沉浸式發帖、瀏覽、點贊、回帖、 ......

    uj5u.com 2023-04-19 09:08:34 more