Notice
Recent Posts
Recent Comments
Link
투케이2K
294. (ios/swift) JGProgressHUD 라이브러리 사용해 로딩 프로그레스 사용 실시 - loading progress 본문
IOS
294. (ios/swift) JGProgressHUD 라이브러리 사용해 로딩 프로그레스 사용 실시 - loading progress
투케이2K 2022. 11. 17. 10:57[개발 환경 설정]
개발 툴 : XCODE
개발 언어 : SWIFT

[사전 설정]



[소스 코드]
// MARK: - [테스트 메인 함수 정의 실시]
func testMain() {
print("")
print("====================================")
print("[\(self.ACTIVITY_NAME) >> testMain() :: 테스트 함수 시작 실시]")
print("====================================")
print("")
/*
-------------------------------
[요약 설명]
-------------------------------
1. 설 명 : 로딩 프로그레스 동작 수행 라이브러리
-------------------------------
2. 설치 주소 git 사이트 : https://github.com/JonasGessner/JGProgressHUD.git
-------------------------------
3. 필요 import 설정 :
import JGProgressHUD
-------------------------------
4. 참고 사이트 :
https://github.com/JonasGessner/JGProgressHUD
-------------------------------
*/
// [로직 처리 수행]
DispatchQueue.main.async {
// [JGProgressHUD 인스턴스 생성]
let hud = JGProgressHUD()
// [로딩 프로그레스 배경 색상 지정]
hud.backgroundColor = .darkGray
// [로딩 프로그레스 스타일 테마 설정]
hud.style = .dark
// [로딩 프로그레에 표시될 텍스트 설정]
hud.textLabel.text = "Loading"
// [로딩 프로그레스 활성]
hud.show(in: self.view)
// [일정 시간 후 로딩 프로그레스 닫기 설정]
hud.dismiss(afterDelay: 8.0)
}
}
[결과 출력]

반응형
'IOS' 카테고리의 다른 글
Comments