Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/danuja01/my-swift-shortnote
https://github.com/danuja01/my-swift-shortnote
Last synced: 27 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/danuja01/my-swift-shortnote
- Owner: danuja01
- Created: 2024-05-19T16:56:41.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2024-05-19T17:08:04.000Z (6 months ago)
- Last Synced: 2024-05-19T18:25:00.112Z (6 months ago)
- Language: Swift
- Size: 9.77 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# My Swift Short Note
This repository contains sample example codes that cover the basic concepts of Swift programming. Each concept is demonstrated with simple, easy-to-understand examples in the `basics.swift` file.
## Concepts Covered
- Variables (let, var)
- Data Types
- Strings
- Integers, Decimals, and Booleans
- Arrays
- Dictionaries
- Sets
- Enums
- Type Annotations
- Conditions (if, switch, ternary)
- Loops
- Functions (all kinds)
- Returning multiple values from functions
- Providing default values for functions
- Handling errors in functions
- Closures
- Structs
- Computed Properties (mutating functions, dynamic properties)
- Property Observers (didSet)
- Custom Initializers
- Access Control
- Static properties & methods
- Classes
- Protocols & extensions
- Optionals
- Nil Coalescing (to be added)## How to Use
1. **Clone the repository:**
```sh
git clone https://github.com/yourusername/my-swift-short-note.git
```2. **Navigate to the project directory:**
```sh
cd my-swift-short-note
```3. **Open the `basics.swift` file in your preferred Swift IDE (Xcode, Visual Studio Code, etc.):**
4. **Explore the examples:**
- The `basics.swift` file contains commented sections for each concept. You can run the file to see how each example works.
- Modify the examples or add your own to further understand each concept.## Contributing
If you find any issues or have suggestions for additional examples, please feel free to open an issue or submit a pull request.
---
Happy coding!