Skip to content

Latest commit

 

History

History

MGURegularPolygon

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

HexagonalWallpaper

Swift Objective-C
iOS

애니메이팅 가능한 Hexagonal Tiling Wallpaper View

  • 앱의 배경을 꾸며줄 수 있는 애니메이팅 가능한 6각형 조각으로 빈틈없이 채우는(hexagonal tiling) Wallpaper View
  • IV-Drop을 만들면서 Wallpaper의 요구사항이 있어서 제작함.

Features

  • 6각형 크기 조절 가능
  • 6각형 보더 굵기 조절 가능
  • 애니메이팅 + 리벌스 애니메이팅 가능
  • HSB 기반 랜덤 칼라(보더, 면) 가능
  • Swift and Objective-C compatability
  • Written in Objective-C

Preview

  • n각형 생성 및 회전
  • 크기 조절 및 커팅
  • 애니메이팅 + 리벌스 애니메이팅
  • IV-Drop에서 사용한 Wallpaper
n각형 생성 및 회전 크기 조절 및 커팅
애니메이팅 + 리벌스 애니메이팅 IV-Drop에서 사용한 Wallpaper

Documentation

  • 도형 배치를 위한 알고리즘 구상

  • 포커스 랜덤 함수 구상
    • 예를 들어 파란색 부터 흰색을 HSB 값으로 랜덤하게 배치했을 때, 파란색에 치우치게 랜덤 색이 나오게 하기 위해서 구상함

@IBAction func sliderValueChanged(_ sender: UISlider) {
    hexagonalWallpaperView.layer.timeOffset = CFTimeInterval(sender.value)
}
private func onboardingAnimationStart() {
    let hexagonalProgressAnimation = self.hexagonalWallpaperView.hexagonalProgressAnimation()
    
    CATransaction.setCompletionBlock { }
    self.hexagonalWallpaperView.layer.add(hexagonalProgressAnimation, forKey: "HexagonalProgressAnimationKey")
}

Author

sonkoni(손관현), [email protected]

License

This project is released under the MIT License. See LICENSE for more information.