This file contains hidden or 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 shadowPath = UIBezierPath.init(rect: regiseButton.bounds) | |
| regiseButton.layer.masksToBounds = false; | |
| regiseButton.layer.shadowColor = UIColor.black.cgColor | |
| regiseButton.layer.shadowOffset = CGSize(width: 0, height: 0) | |
| regiseButton.layer.shadowOpacity = 1; | |
| regiseButton.layer.shadowRadius = 25 | |
| regiseButton.layer.shadowPath = shadowPath.cgPath; |
This file contains hidden or 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
| class Test { | |
| dynamic func foo() { | |
| print("bar") | |
| } | |
| } | |
| extension Test { | |
| @_dynamicReplacement(for: foo()) | |
| func foo_new() { | |
| print("bar new") |
This file contains hidden or 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
| private var isConnectedToVpn: Bool { | |
| if let settings = CFNetworkCopySystemProxySettings()?.takeRetainedValue() as? Dictionary<String, Any>, | |
| let scopes = settings["__SCOPED__"] as? [String:Any] { | |
| for (key, _) in scopes { | |
| if key.contains("tap") || key.contains("tun") || key.contains("ppp") || key.contains("ipsec") || key.contains("ipsec0") { | |
| return true | |
| } | |
| } | |
| } | |
| return false |
This file contains hidden or 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
| <key>NSAppTransportSecurity</key> | |
| <dict> | |
| <key>NSExceptionDomains</key> | |
| <dict> | |
| <key>www.baidu.com</key> | |
| <dict> | |
| <key>NSIncludesSubdomains</key> | |
| <true/> | |
| <key>NSExceptionRequiresForwardSecrecy</key> | |
| <false/> |
This file contains hidden or 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
| // 一般赋值使用的是_controller.text = "demo"; | |
| // 如果要使光标置于最后要使用下面这种方式 | |
| _controller.value = TextEditingValue( | |
| text: result, | |
| selection: TextSelection.fromPosition(TextPosition( | |
| affinity: TextAffinity.downstream, | |
| offset: result.length | |
| )) | |
| ); |
This file contains hidden or 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
| TextField( | |
| keyboardType: TextInputType.number, | |
| inputFormatters: [FilteringTextInputFormatter.allow(RegExp(r'[0-9]'))], | |
| decoration: InputDecoration( | |
| hintText: "入れ替えの比例", | |
| hintStyle: TextStyle(fontSize: 14, color: AppColors.color_cccccc), | |
| fillColor: AppColors.color_f6f6f6, | |
| filled: true, | |
| border: | |
| OutlineInputBorder(borderRadius: BorderRadius.circular(6), borderSide: BorderSide.none), |
OlderNewer