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 | |
class IconLabel:UIView{ | |
var iconPadding: CGFloat = 6 { | |
didSet{ | |
updateConstraintsIfNeeded() | |
} | |
} | |
var text :String?{ |
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 | |
class CircleImageView: UIImageView { | |
var borderWidth:CGFloat=6.0{ | |
didSet{ | |
updateBorderStyle() | |
} | |
} | |
var borderColor:UIColor=UIColor(white: 160, alpha: 0.5){ |
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
// Playground - noun: a place where people can play | |
import UIKit | |
extension UIColor{ | |
convenience init(hex:Int){ | |
let red = CGFloat((hex >> 16) & 0xff) / 255.0 | |
let green = CGFloat((hex >> 8) & 0xff) / 255.0 | |
let blue = CGFloat( hex & 0xff) / 255.0 | |
self.init(red:red,green:green,blue:blue,alpha:1) |
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
class CommentView:UICollectionViewCell{ | |
let nameView = UILabel() | |
let textLabel = UILabel() | |
class var identifier:String{ | |
return "CommentView" | |
} | |
override init(frame: CGRect) { | |
super.init(frame: frame) | |
setup() |
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
class TextCommentView:UILabel{ | |
var name :String = ""{ | |
didSet{ | |
updateText() | |
} | |
} | |
var comment:String = ""{ | |
didSet{ | |
updateText() |
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
class CommentView:UIControl{ | |
let nameView = UILabel() | |
let textLabel = UILabel() | |
let innerSpace:CGFloat = 4 | |
var insets:UIEdgeInsets = UIEdgeInsets(top: 8, left: 8, bottom: 8, right: 8){ | |
didSet{ | |
invalidateIntrinsicContentSize() | |
} | |
} | |
class var identifier:String{ |
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
class GradientMaskImageView:UIImageView{ | |
let gradientLayer = CAGradientLayer() | |
override init(image: UIImage!) { | |
super.init(image: image) | |
let startColor = UIColor(white: 0, alpha: 0.05) | |
let midColor = UIColor(white: 0, alpha: 0.3) | |
let endColor = UIColor(white: 0, alpha: 0.6) | |
gradientLayer.colors = [ startColor.CGColor, midColor.CGColor, endColor.CGColor ] | |
gradientLayer.frame = frame | |
layer.addSublayer(gradientLayer) |
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 uploadThreadImages(selectedImages:[SelectedImage], | |
success:(uploadedImages:[String]) -> Void, | |
error:(resp:UploadImageResponse)-> Void ){ | |
var remindCount = selectedImages.count | |
var uploadedImages:[String] = [] | |
showProgress(label: "正上传图片") | |
let uploadOne = { () -> Void in | |
remindCount-- |
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
# -*- coding: utf-8 -*- | |
from time import sleep,time | |
# Imports the monkeyrunner modules used by this program | |
from com.android.monkeyrunner import MonkeyRunner,MonkeyDevice | |
# Connects to the current device, returning a MonkeyDevice object | |
print("Waiting for connect...") | |
device = MonkeyRunner.waitForConnection() | |
print("Connected") | |
while True: |
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
.method public static getMd5_2(Ljava/lang/String;)Ljava/lang/String; | |
.locals 7 | |
.param p0, "originStr" # Ljava/lang/String; | |
.annotation system Ldalvik/annotation/Throws; | |
value = { | |
Ljava/lang/Exception; | |
} | |
.end annotation | |
.prologue | |
.line 485 |
OlderNewer