This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (void)layoutSubviews{ | |
[super layoutSubviews]; | |
[UIView beginAnimations:nil context:NULL]; | |
[UIView setAnimationBeginsFromCurrentState:YES]; | |
[UIView setAnimationDuration:0.0f]; | |
for (UIView *subview in self.subviews) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import SwiftUI | |
import WidgetKit | |
@available(iOS, deprecated: 18.0, message: "use WidgetAccentedRenderingMode instead") | |
enum BackdeployedWidgetAccentedRenderingMode { | |
case accented | |
case accentedDesaturated | |
case desaturated | |
case fullColor | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import SwiftUI | |
import WidgetKit | |
@available(iOS, deprecated: 18.0, message: "use WidgetAccentedRenderingMode instead") | |
enum BackdeployedWidgetAccentedRenderingMode { | |
case accented | |
case accentedDesaturated | |
case desaturated | |
case fullColor | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func isConnectedToVpn() -> Bool { | |
let host = "www.example.com" | |
guard let reachability = SCNetworkReachabilityCreateWithName(nil, host) else { | |
return false | |
} | |
var flags = SCNetworkReachabilityFlags() | |
if SCNetworkReachabilityGetFlags(reachability, &flags) == false { | |
return false | |
} | |
let isOnline = flags.contains(.reachable) && !flags.contains(.connectionRequired) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.cproject | |
.project | |
build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let defaultFontSizeTable = [ | |
UIFontTextStyleHeadline: [ | |
UIContentSizeCategoryAccessibilityExtraExtraExtraLarge: 26, | |
UIContentSizeCategoryAccessibilityExtraExtraLarge: 25, | |
UIContentSizeCategoryAccessibilityExtraLarge: 24, | |
UIContentSizeCategoryAccessibilityLarge: 24, | |
UIContentSizeCategoryAccessibilityMedium: 23, | |
UIContentSizeCategoryExtraExtraExtraLarge: 23, | |
UIContentSizeCategoryExtraExtraLarge: 22, | |
UIContentSizeCategoryExtraLarge: 21, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# This script downloads and builds the iOS, tvOS and Mac openSSL libraries with Bitcode enabled | |
# Credits: | |
# https://github.com/st3fan/ios-openssl | |
# https://github.com/x2on/OpenSSL-for-iPhone/blob/master/build-libssl.sh | |
# https://gist.github.com/foozmeat/5154962 | |
# Peter Steinberger, PSPDFKit GmbH, @steipete. | |
# Felix Schwarz, IOSPIRIT GmbH, @felix_schwarz. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifndef __FINK_ENDIANDEV_PKG_ENDIAN_H__ | |
#define __FINK_ENDIANDEV_PKG_ENDIAN_H__ 1 | |
/** compatibility header for endian.h | |
* This is a simple compatibility shim to convert | |
* BSD/Linux endian macros to the Mac OS X equivalents. | |
* It is public domain. | |
* */ | |
#ifndef __APPLE__ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// StickyHeadersCollectionViewFlowLayout | |
// | |
// A subclass of UICollectionViewFlowLayout which has UITableView style sticky headers. | |
// | |
// This code is based on Evadne Wu's code^1, with the following changes: | |
// | |
// * Fixes a crash for sections with zero items | |
// * Adds support for UIScrollView's contentInset | |
// * Adds support for UICollectionViewFlowLayout's sectionInset | |
// |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* | |
* [Panel] | |
* nf_check = script-name=nf_check, title="Netflix 解锁检测", content="请刷新", update-interval=1 | |
* | |
* [Script] | |
* nf_check = type=generic, script-path=https://gist.githubusercontent.com/Hyseen/b06e911a41036ebc36acf04ddebe7b9a/raw/nf_check.js?version=1633074636264, argument=title=Netflix 解锁检测 | |
* | |
* 支持使用脚本使用 argument 参数自定义配置,如:argument=key1=URLEncode(value1)&key2=URLEncode(value2),具体参数如下所示, | |
* title: 面板标题 |
NewerOlder