root
|
+-- tips.md
+-- tips2.md
+-- img --- image.png
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@discardableResult | |
func some() -> Bool { | |
// do something | |
if error { | |
return false | |
} | |
return true | |
} | |
// _ = some() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Group { | |
// view logic | |
} | |
.onAppear { | |
// do something | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
keyDecodingStrategy = .convertFromSnakeCase |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// iPhone 12 Proのアスペクト比 | |
<img src="url" height="844" width="390"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
protocol HeaderViewDelegate: AnyObject { | |
var HeaderPresenter: HeaderPresenter { get } | |
func showAlert(of _: Error) | |
} | |
extension HeaderViewDelegate where Self: UIViewController {} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// https://zenn.dev/yumiyoshi/scraps/363a710df362b8 | |
git branch | xargs git branch -d |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// from: | |
// https://developer.apple.com/documentation/combine/just/erasetoanypublisher() | |
import Combine | |
public class TypeWithSubject { | |
public let publisher: some Publisher = PassthroughSubject<Int,Never>() | |
} | |
public class TypeWithErasedSubject { | |
public let publisher: some Publisher = PassthroughSubject<Int,Never>() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Res { | |
let temp = "temp" | |
} | |
let reses = [Res(), Res(), Res()] | |
print(reses.map(\.temp)) // ["temp", "temp", "temp"] |