Skip to content

Commit

Permalink
Add documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
johnlee92 authored and jaehyeon.lee committed Sep 2, 2024
1 parent 37f5d6b commit 4f9c409
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Sources/GentooSDK/GentooFloatingButton.swift
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@ public class GentooFloatingButton: UIControl {

public private(set) var contentType: ContentType = .normal


/// ContentType을 설정하여 현재 입력된 버튼의 텍스트가 갱신되게 할 수 있습니다.
///
/// - Parameter type: `.normal`은 현재 item을, `.recommendation`은 추천 item을 표시합니다.
public func setContentType(_ type: ContentType) {
self.contentType = type
if type == .recommendation {
Expand All @@ -75,6 +79,7 @@ public class GentooFloatingButton: UIControl {
}
}

/// 표시할 item의 식별자를 입력합니다.
public var itemId: String? {
didSet {
loadCommentIfNeeded()
Expand Down
2 changes: 2 additions & 0 deletions Sources/GentooSDK/GentooSDK.swift
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,12 @@ public final class Gentoo {
public let message: String
}

/// Gentoo SDK를 초기화합니다. App이 초기화될 때 호출하는 것을 권장합니다.
public static func initialize(with configuration: Configruation) {
Gentoo.shared.initialize(with: configuration)
}

/// Gentoo SDK의 로그를 확인할 수 있는 Callback입니다.
public static var onLog: ((Log) -> Void)? {
get { Gentoo.shared.queue.sync { Gentoo.shared._logHandler } }
set { Gentoo.shared.queue.sync { Gentoo.shared._logHandler = newValue } }
Expand Down

0 comments on commit 4f9c409

Please sign in to comment.