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
// Full implementation skipped for brevity | |
private func createCardView() -> some View { | |
let backgroundColor = AppColor.cardBackground | |
return HStack(alignment: .top, spacing: 16) { | |
createContainer() | |
Spacer() | |
createAvatarContainer() | |
}.frame(height: 135) | |
.background(backgroundColor) |
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
// SwiftUI | |
Text("Hello World").font(.title).color(.red) | |
// UIKit | |
let label = UILabel() | |
label.text = "Hello World" | |
label.font = .preferredFont(forTextStyle: .title1) | |
label.textColor = .red |
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
struct Point { | |
let x, y: Int | |
} | |
func createPoint() { | |
let point = Point(x: 0, y: 0) | |
} | |
createPoint() |
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
#include <iostream> | |
#include <string> | |
int main() { | |
std::string numberString = "1234"; | |
int numberInt = 0; | |
for (int i = 0; i < numberString.length(); i++) { | |
numberInt = numberInt * 10 + numberString[i] - '0'; | |
} | |
std::cout << "String number: " << numberString << std::endl; |