Skip to content

Instantly share code, notes, and snippets.

View byJeevan's full-sized avatar
💭
Working from Home 🏡

Jeevan byJeevan

💭
Working from Home 🏡
View GitHub Profile
SwiftUI Components & Extension that saves iOSDev time.
### UIKit is **EVENT-Driven** framework - We could reference each view in the hierarchy, update its appearance when the view is loaded or as a reaction on an event.
### SwiftUI is **Declarative, State Driven** framework - We cannot reference any view in the hierarchy, neither can we directly mutate a view as a reaction to an event.
Instead, we mutate the state bound to the view. Delegates, target-actions, responder chain, KVO .. replaced with Closures & bindings.
@koingdev
koingdev / ExportOptions.plist
Last active November 8, 2023 08:23
Script to automatically upload iOS App to AppStore and TestFlight (including versioning)
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>destination</key>
<string>upload</string>
<key>method</key>
<string>app-store</string>
<key>provisioningProfiles</key>
<dict>
@byJeevan
byJeevan / Swift iOS Recipes
Last active April 6, 2024 14:05 — forked from bobbyali/Swift iOS Recipes
Swift iOS Code Recipes
Swift iOS Recipes
==================
> https://github.com/JohnSundell/SwiftTips
** GUI Layout **
//Avoid Table view having Textfield covered by Keyboard
override func viewWillAppear(_ animated: Bool) {
@byJeevan
byJeevan / UsefullMacCommands.txt
Last active January 21, 2019 07:19
Collection of XCode commands & other MAC terminal commands collections for reference.
//To show touch impression in simulator
//Note: Restart simulator after executing
defaults write com.apple.iphonesimulator ShowSingleTouches 1
//To record video in the simulator
//Note : Close simulator and run command
xcrun simctl io booted recordVideo ~/Desktop/record_file_name.mp4
//To show hidden files in the mac
@byJeevan
byJeevan / Swift3.1 CheatSheet Plus
Last active May 31, 2020 12:52
Swift Cheat Sheet to save time.
/*
* Author : Jeevan Rao
* Date : 13/0/2017
* Swift : V3.1
*/
/* UI + UX Tricks */
//Selection style of table view cell (other than Default grey / Blue/ none)
let selectionColorView = UIView()
@tadija
tadija / FontNames-iOS-17.4.swift
Last active April 30, 2024 00:30
iOS - All Font Names
/*
*** Academy Engraved LET ***
AcademyEngravedLetPlain
---------------------
*** Al Nile ***
AlNile
AlNile-Bold
---------------------
*** American Typewriter ***
AmericanTypewriter
@AlexanderZ-aFrogleap
AlexanderZ-aFrogleap / SectionedTableViewAdapter.swift
Created October 15, 2016 20:12
Generic UITableView adapter with sections
//: Playground - noun: a place where people can play
import UIKit
protocol SectionModel {
var count: Int { get }
func cell(at: Int) -> UITableViewCell
func selected(at: Int)
}
@modusCell
modusCell / Emoticons.plist
Created January 1, 2016 01:36
List of emoticons (emoji) found in IOS in plist format
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>emoticons</key>
<array>
<dict>
<key>set_name</key>
<string>Smileys &amp; People</string>
<key>emoticons</key>
@zacwest
zacwest / ios-font-sizes.swift
Last active May 6, 2024 13:04
iOS default font sizes - also available on https://www.iosfontsizes.com
let styles: [UIFont.TextStyle] = [
// iOS 17
.extraLargeTitle, .extraLargeTitle2,
// iOS 11
.largeTitle,
// iOS 9
.title1, .title2, .title3, .callout,
// iOS 7
.headline, .subheadline, .body, .footnote, .caption1, .caption2,
]
@kristofer
kristofer / gist:560ba94600351f47a495
Last active July 28, 2020 19:31
iOS Share Extension NSPredicate trick
//After way, way, way too much trial and error, I finally found a way to create the Share Extension for documents that I was seeking.
// It's not obvious what the NSPredicate should be, but then harder was a lack of example of how to actually use the predicate
// within the Info.plist file of an iOS (8.2+) share extension
<key>NSExtension</key>
<dict>
<key>NSExtensionAttributes</key>
<dict>
<key>NSExtensionActivationRule</key>
<string>SUBQUERY (