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 UIKit | |
extension UIView { | |
var allSubviews: [UIView] { | |
subviews + subviews.flatMap { $0.allSubviews } | |
} | |
func firstSubview<T: UIView>(of type: T.Type) -> T? { | |
allSubviews.first { $0 is T } as? T |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8" /> | |
<title>iphone-inline-video demo with playsinline</title> | |
</head> | |
<body> | |
<video loop playsinline autoplay="autoplay" id="video1" muted="muted" poster="http://image.baby-kingdom.com/images2/2016/b/html5/wyeth_20161122_320x280/poster.jpg" type="video/mp4" width="100%" src="http://image.baby-kingdom.com/images2/2016/b/html5/wyeth_20161122_320x280/video.mp4"> | |
</video> |
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
+#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) && !defined(AF_APP_EXTENSIONS) | |
- (void)setShouldExecuteAsBackgroundTaskWithExpirationHandler:(void (^)(void))handler; - (void)setShouldExecuteAsBackgroundTaskWithExpirationHandler:(void (^)(void))handler; | |
#endif #endif |
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
// | |
// YYImage+LKUIKit.m | |
// LKUIKit | |
// | |
// Created by karos li on 2018/1/17. | |
// Copyright © 2018年 karos. All rights reserved. | |
// | |
#import "YYImage+LKUIKit.h" |
NewerOlder