<commit_before>//
//  UIApplication+RGAppTools.swift
//  RGAppTools
//
//  Created by RAIN on 2020/1/21.
//  Copyright © 2020 Smartech. All rights reserved.
//

import UIKit

extension RGAppTools where Base: UIApplication {
    
    /// frame of status bar
    public static var statusBarFrame: CGRect {
        if #available(iOS 13.0, *) {
            return UIApplication.shared.keyWindow?.windowScene?.statusBarManager?.statusBarFrame ?? UIApplication.shared.statusBarFrame
        } else {
            return UIApplication.shared.statusBarFrame
        }
    }

    public static var statusBarHeight: CGFloat {
        return UIApplication.rat.statusBarFrame.height
    }

    public static var statusBarDefaultHeight: CGFloat {
        return UIDevice.rat.isIPhoneXSeriesUI ? 44.0 : 20.0
    }

}<commit_msg>docs (UIApplication) : add comments<commit_after>//
//  UIApplication+RGAppTools.swift
//  RGAppTools
//
//  Created by RAIN on 2020/1/21.
//  Copyright © 2020 Smartech. All rights reserved.
//

import UIKit

extension RGAppTools where Base: UIApplication {
    
    /// frame of status bar
    public static var statusBarFrame: CGRect {
        if #available(iOS 13.0, *) {
            return UIApplication.shared.keyWindow?.windowScene?.statusBarManager?.statusBarFrame ?? UIApplication.shared.statusBarFrame
        } else {
            return UIApplication.shared.statusBarFrame
        }
    }

    /// height of status bar
    public static var statusBarHeight: CGFloat {
        return UIApplication.rat.statusBarFrame.height
    }

    /// default height of status bar
    public static var statusBarDefaultHeight: CGFloat {
        return UIDevice.rat.isIPhoneXSeriesUI ? 44.0 : 20.0
    }

}
{'fraction_non_alphanumeric': 0.09043173862310384, 'fraction_numerical': 0.023337222870478413, 'mean_word_length': 2.587866108786611, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3867753', 'n_tokens_mistral': 537, 'n_tokens_neox': 487, 'n_words': 124}