Files
yuyin_ios/SweetParty/第三方库/KNPhotoBrowser/KNPhotoBrowserPch.h

52 lines
1.3 KiB
C
Raw Permalink Normal View History

2025-08-08 11:05:33 +08:00
//
// KNPhotoBrowser.h
// KNPhotoBrowser
//
// Created by LuKane on 16/8/18.
// Copyright © 2016年 LuKane. All rights reserved.
//
/**
* bug , github '' issue ,
* github地址 : https://github.com/LuKane/KNPhotoBrowser
* , , Star
*/
#ifndef ScreenWidth
#define ScreenWidth [UIScreen mainScreen].bounds.size.width
#endif
#ifndef ScreenHeight
#define ScreenHeight [UIScreen mainScreen].bounds.size.height
#endif
#ifndef PBViewWidth
#define PBViewWidth self.view.bounds.size.width
#endif
#ifndef PBViewHeight
#define PBViewHeight self.view.bounds.size.height
#endif
#define PBDeviceHasBang \
({\
BOOL hasBang = false;\
if (@available(iOS 11.0, *)) {\
hasBang = [UIApplication sharedApplication].keyWindow.safeAreaInsets.bottom;\
}\
(hasBang);\
})
/// Portrait
#ifndef isPortrait
#define isPortrait ([[UIApplication sharedApplication] statusBarOrientation] == UIInterfaceOrientationPortrait || [[UIApplication sharedApplication] statusBarOrientation] == UIInterfaceOrientationPortraitUpsideDown)
#endif
#define PhotoBrowserAnimateTime 0.3
// define SDWebImagePrefetcher max number
#define PhotoBrowserPrefetchNum 8