• 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) {
           /......
    }
  • 相关阅读:
    P1966 火柴排队
    其实,我可以假装这篇随笔的名字很长,很长
    通用技术课的准备
    浅谈高压线除冰技术
    浅谈发电厂的环保问题
    本地MD搬运
    高考作文专题
    奇奇怪怪的错误收集 (鸽)
    2019CSP-S2专题
    模拟赛 ——“与” 小象涂色 行动!行动!
  • 原文地址:https://www.cnblogs.com/mawenqiangios/p/5884382.html
Copyright © 2020-2023  润新知