mirror of
https://github.com/wahyd4/Yep.git
synced 2026-08-25 04:36:24 +10:00
add MessageLoadingProgressView
This commit is contained in:
@@ -181,6 +181,7 @@
|
||||
50A9D4511ACD383E000B2599 /* NSDate+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 50A9D4501ACD383E000B2599 /* NSDate+Extension.swift */; };
|
||||
50A9D4571ACD393A000B2599 /* YepWaverView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 50A9D4541ACD393A000B2599 /* YepWaverView.swift */; };
|
||||
50B8E6161B40F9E700C17EA1 /* YepDownloader.swift in Sources */ = {isa = PBXBuildFile; fileRef = 50B8E6151B40F9E700C17EA1 /* YepDownloader.swift */; };
|
||||
50B8E6181B41340A00C17EA1 /* MessageLoadingProgressView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 50B8E6171B41340A00C17EA1 /* MessageLoadingProgressView.swift */; };
|
||||
50C0909B1ADE234F00CC6389 /* RegisterPickSkillsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 50C0909A1ADE234F00CC6389 /* RegisterPickSkillsViewController.swift */; };
|
||||
50C0909D1ADE294800CC6389 /* RegisterPickSkillsLayout.swift in Sources */ = {isa = PBXBuildFile; fileRef = 50C0909C1ADE294800CC6389 /* RegisterPickSkillsLayout.swift */; };
|
||||
50C090A01ADE391600CC6389 /* AddSkillsReusableView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 50C0909E1ADE391600CC6389 /* AddSkillsReusableView.swift */; };
|
||||
@@ -402,6 +403,7 @@
|
||||
50A9D4501ACD383E000B2599 /* NSDate+Extension.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = "NSDate+Extension.swift"; path = "Extensions/NSDate+Extension.swift"; sourceTree = "<group>"; };
|
||||
50A9D4541ACD393A000B2599 /* YepWaverView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = YepWaverView.swift; path = Views/AudioWaves/YepWaverView.swift; sourceTree = "<group>"; };
|
||||
50B8E6151B40F9E700C17EA1 /* YepDownloader.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = YepDownloader.swift; path = Services/YepDownloader.swift; sourceTree = "<group>"; };
|
||||
50B8E6171B41340A00C17EA1 /* MessageLoadingProgressView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = MessageLoadingProgressView.swift; path = Views/ProgressViews/MessageLoadingProgressView.swift; sourceTree = "<group>"; };
|
||||
50C0909A1ADE234F00CC6389 /* RegisterPickSkillsViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = RegisterPickSkillsViewController.swift; path = ViewControllers/Register/RegisterPickSkillsViewController.swift; sourceTree = "<group>"; };
|
||||
50C0909C1ADE294800CC6389 /* RegisterPickSkillsLayout.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = RegisterPickSkillsLayout.swift; path = ViewControllers/Register/RegisterPickSkillsLayout.swift; sourceTree = "<group>"; };
|
||||
50C0909E1ADE391600CC6389 /* AddSkillsReusableView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = AddSkillsReusableView.swift; path = Views/ReusableViews/AddSkills/AddSkillsReusableView.swift; sourceTree = "<group>"; };
|
||||
@@ -756,6 +758,7 @@
|
||||
5023DE391AB6979C00B3EE96 /* Views */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
50B8E6191B41341000C17EA1 /* ProgressViews */,
|
||||
504CBA3B1B3D048900663A90 /* TextViews */,
|
||||
50F2B9791B2EEAE300F840CC /* Labels */,
|
||||
50A9D4581ACD3943000B2599 /* AudioWaves */,
|
||||
@@ -1329,6 +1332,14 @@
|
||||
name = AudioWaves;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
50B8E6191B41341000C17EA1 /* ProgressViews */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
50B8E6171B41340A00C17EA1 /* MessageLoadingProgressView.swift */,
|
||||
);
|
||||
name = ProgressViews;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
50C090A21ADE391900CC6389 /* AddSkills */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
@@ -1787,6 +1798,7 @@
|
||||
5023DE371AB6979600B3EE96 /* ConversationCell.swift in Sources */,
|
||||
502AE5351AB8649F005BD199 /* LoginByMobileViewController.swift in Sources */,
|
||||
506BB7F91AE5069500C1A2A0 /* RegisterPickSkillsSelectSkillsTransitionManager.swift in Sources */,
|
||||
50B8E6181B41340A00C17EA1 /* MessageLoadingProgressView.swift in Sources */,
|
||||
502AE52B1AB819AF005BD199 /* YepConfig.swift in Sources */,
|
||||
0A271FD71ACA055400822DFC /* YepAudioService.swift in Sources */,
|
||||
5064F6501B0AE2E60089FAD4 /* AddFriendsViewController.swift in Sources */,
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
//
|
||||
// MessageLoadingProgressView.swift
|
||||
// Yep
|
||||
//
|
||||
// Created by NIX on 15/6/29.
|
||||
// Copyright (c) 2015年 Catch Inc. All rights reserved.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
|
||||
class MessageLoadingProgressView: UIView {
|
||||
|
||||
var progress: Double = 0.7
|
||||
|
||||
override func drawRect(rect: CGRect) {
|
||||
|
||||
let center = CGPoint(x: CGRectGetMidX(rect), y: CGRectGetMidY(rect))
|
||||
let lineWidth: CGFloat = 6
|
||||
let radius = min(rect.width, rect.height) * 0.5 - lineWidth * 0.5
|
||||
|
||||
let path = UIBezierPath(arcCenter: center, radius: radius, startAngle: CGFloat(-M_PI_2), endAngle: CGFloat(M_PI * 2 * progress - M_PI_2), clockwise: true)
|
||||
path.lineWidth = lineWidth
|
||||
path.lineCapStyle = kCGLineCapRound
|
||||
|
||||
UIColor.redColor().setStroke()
|
||||
|
||||
path.stroke()
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user