CocoaPods trunk is moving to be read-only. Read more on the blog, there are 18 months to go.

AstrologyCalc 0.0.3

AstrologyCalc 0.0.3

Maintained by Emil Karimov.



Astrology Calculator by Emil Karimov

This is Moon Calc Framework Get moon phase by Date and Location

What we can do right now:

  • set and rise moon
  • get moon Age
  • get moon rise
  • get moon set
  • get zodiac sign
  • get moon phase
  • get moon trajectory
  • get moon rise if rise on past date
  • get moon set if set on future date
  • get zodiac sign rise time
  • get zodiac sign set time
  • get mercury status and times
  • get eclipse times (begin, duration, finish)

Support AstrologyCalc development by giving a ⭐️

Installation

via Cocapods

pod 'AstrologyCalc', :git => 'https://github.com/emvakar/AstrologyCalc.git', :tag => 'v0.0.2', :modular_headers => true

Usage

import UIKit
import CoreLocation
import AstrologyCalc

class ViewController: UIViewController {

    let location = CLLocation(latitude: 55.751244, longitude: 37.618423) // Moscow
    var moonPhaseManager: MoonCalculatorManager!

    override func viewDidLoad() {
        super.viewDidLoad()
        self.view.backgroundColor = .white
        self.moonPhaseManager = MoonCalculatorManager(location: location)

        let info = self.moonPhaseManager.getInfo(date: Date())

        print("Current localtion: -", info.location.coordinate)

        print("Moon days at", "current date: -", info.date)
        info.moonModels.forEach {
            print("===========")
            print("Moon Age: -", $0.age)
            print("Moon rise: -", $0.moonRise)
            print("Moon set: -", $0.moonSet)
        }
        print("===========")
        print("Moon phase: -", info.phase)
        print("Moon trajectory: -", info.trajectory)
    }
}

We have also an application example in which you can see clearly how it use.

  1. Just clone the repository
  2. Select run target "Example"
  3. Now just run App