zoukankan      html  css  js  c++  java
  • iOS开发之状态栏UIStatusBar图标操作

    NSArray *subIcons = [[[[UIApplication sharedApplication] valueForKeyPath:@"statusBar"] valueForKeyPath:@"foregroundView"] subviews];
    Printing description of subIcons:
    <__NSArrayM 0x7ff61141b640>(
    <UIStatusBarServiceItemView: 0x7ff61171ad10; frame = (6 0; 39 20); autoresize = RM+BM; userInteractionEnabled = NO; layer = <CALayer: 0x7ff611712480>> [Item = <UIStatusBarItem: 0x7ff61170fa90> [UIStatusBarServiceItemView (Left)]],
    <UIStatusBarDataNetworkItemView: 0x7ff61141b010; frame = (50 0; 13 20); autoresize = RM+BM; userInteractionEnabled = NO; layer = <CALayer: 0x7ff611419c60>> [Item = <UIStatusBarItem: 0x7ff611419670> [UIStatusBarDataNetworkItemView (Left)]],
    <UIStatusBarBatteryItemView: 0x7ff61141bad0; frame = (384 0; 25 20); autoresize = LM+BM; userInteractionEnabled = NO; layer = <CALayer: 0x7ff61141a720>> [Item = <UIStatusBarItem: 0x7ff61141a880> [UIStatusBarBatteryItemView (Right)]],
    <UIStatusBarTimeItemView: 0x7ff6114212c0; frame = (185 0; 49 20); userInteractionEnabled = NO; layer = <CALayer: 0x7ff6114216c0>> [Item = <UIStatusBarItem: 0x7ff611702c90> [UIStatusBarTimeItemView (Center)]]
    )
     for (id icon in subIcons) {
           /......
    }
  • 相关阅读:
    AcWing 199. 余数之和
    AcWing 295. 清理班次
    AcWing 294. 计算重复
    Acwing 393. 雇佣收银员
    AcWing 362. 区间
    AcWing 361. 观光奶牛
    CSP-S 2019 Emiya 家今天的饭
    CSP-S 2019游记
    AcWing 345. 牛站 Cow Relays
    java 环境配置
  • 原文地址:https://www.cnblogs.com/starainDou/p/5781349.html
Copyright © 2011-2022 走看看