Skip to content

Instantly share code, notes, and snippets.

View factoryhr's full-sized avatar

Factory.dev factoryhr

View GitHub Profile
$mainNavigation = $this->navigation()->buildNavigation($document, $mainNavStartNode, null, function($page, $document) {
if($document->getProperty("templateType") == "brand" && $document->getProperty("globalRootBrand")) {
// Loop through "brands" directory children
foreach($document->getProperty("globalRootBrand")->getChilds() as $brand) {
// Dynamically create document page
$page->addPage(new Pimcore\Navigation\Page\Document([
"label" => $brand->getName(),
"id" => "brand-" . $brand->getId(),
"uri" => $this->pimcoreUrl(array('id' => $brand->getId()), "brand")
]));
pod lib create YOUR_LIBRARY_NAME
#DELETE A POD
pod trunk delete PODNAME VERSION
#PUSH THE POD AGAIN
pod trunk push PODNAME
#pod 'CustomUISwitch', :path => "/Users/llovretic/Desktop/CustomUISwitch"
pod 'CustomUISwitch'
pod trunk register [YOUR_EMAIL_ADDRESS] 'YOUR_NAME' --description='CURRENT_DEVICE'
#Public deployment
pod trunk push [NAME.podspec]
#Private deployment
pod repo push REPO [NAME.podspec]
pod spec lint [YOUR_PODSPEC_NAME].podspec
#BEFORE
#Specify the location from where the source should be retrieved.
#spec.source = { :git => "http://EXAMPLE/Switch.git", :tag => "master" }
#source for local lib development.
spec.source = { :path => "Sources/"}
#AFTER
#Specify the location from where the source should be retrieved.
spec.source = { :git => "[YOUR_GIT_URL]", :tag => "[YOUR_TAG]" }
#source for local lib development.
spec.source = { :git => "[LINK_TO_YOUR_REPOSITORY]", :tag => "master" }
#1
import LookingForMagentoDevsThatWillProvideFunctionalityToThisAwesomeSwitch
#2
var customSwitch: CustomSwitch = {
let customSwitch = CustomSwitch()
customSwitch.translatesAutoresizingMaskIntoConstraints = false
customSwitch.onTintColor = UIColor.orange
customSwitch.offTintColor = UIColor.darkGray
customSwitch.cornerRadius = 0.1
customSwitch.thumbCornerRadius = 0.1