Eject alternatives and similar libraries
Based on the "Utility" category.
Alternatively, view Eject alternatives based on common mentions on social networks and blogs.
-
SwifterSwift
A handy collection of more than 500 native Swift extensions to boost your productivity. -
InAppSettingsKit
This iOS framework allows settings to be in-app in addition to or instead of being in the Settings app. -
Reusable
A Swift mixin for reusing views easily and in a type-safe way (UITableViewCells, UICollectionViewCells, custom UIViews, ViewControllers, Storyboards…) -
SwiftLinkPreview
It makes a preview from an URL, grabbing all the information such as title, relevant texts and images. -
BFKit-Swift
BFKit-Swift is a collection of useful classes, structs and extensions to develop Apps faster. -
VTAcknowledgementsViewController
Acknowledgements screen displaying a list of licenses, for example from CocoaPods dependencies. -
SwiftFoundation
Cross-Platform, Protocol-Oriented Programming base library to complement the Swift Standard Library. (Pure Swift, Supports Linux) -
AssistantKit
Easy way to detect iOS device properties, OS versions and work with screen sizes. Powered by Swift. -
DeviceGuru
DeviceGuru is a simple lib (Swift) to know the exact type of the device, e.g. iPhone 6 or iPhone 6s. Please ⭐️ this repo on the top right corner to make this repo popular. -
ZamzamKit
A Swift package for rapid development using a collection of micro utility extensions for Standard Library, Foundation, and other native frameworks.
SaaSHub - Software Alternatives and Reviews
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of Eject or a related project?
README
Eject
Eject is a utility to transition from Interface Builder to programatic view layout. This is done by using code generation to create a .swift
file to replace the view hierarchy managed by the .xib
file.
Why?
One common pain point with Interface Builder is that as a view becomes more dynamic and is managed more programatically, Interface Builder becomes less helpful. This tool lets developers use Interface Builder without that concern, giving them an Eject button to hit when Interace Builder starts getting in the way, and provides an easy path to transition to full programatic view layout.
But But
Yes, I understand that this is probably a bad idea. But it might not be.
Usage
Install with homebrew:
brew install eject
Use on the command line:
eject --file /path/to/MassiveViewController.xib
Copy and paste code into .swift file, and remove the .xib:
rm /path/to/MassiveViewController.xib
Or to see what changed in a xib file by looking at the changes in generated code:
TMP=`mktemp` && git show HEAD:$XIB > $TMP && diff <(eject --file $XIB ) <(eject --file $TMP)
eject
will generate code for everything it can in the .xib
file. If there is any XML that eject
does not understand, it will print out a warning message. Open an Issue with any warnings, bugs or ideas you may have.
Features
- UIKit
.xib
support - Constraints (using Anchorage)
- Outlet and OutletCollection support
- Good variable names
- Use the user entered "user label" if present
- Snake case of the className with the namespace removed
- Constraint variable names are long, but descriptive, (labelBottomEqualToButtonTop)
- Code that compiles out of the box is a non-goal
- Will not generate
view1
,view2
variable names to avoid compile errors. Supply user labels and re-generate.
- Will not generate
Does it work?
The [Unit Tests](EjectKitTests/EjectKitTests.swift#L136###testCollectionView) show how much work is done. UIKit coverage is configured by the [CocoaTouchBuilder](EjectKit/Builder/CocoaTouchBuilder.swift) using various [Builders](EjectKit/Builder). Some configuration is [generated](EjectKitTests/InspectorPropertyConfigurationTests.swift#34) from Interface Builder .inspector
files.
This should still be considered an Alpha quality tool.
Todo
- Enhance code generation approaches
- AppKit support
- Storyboard support?
- Use default values to remove un-needed code
- Better error reporting of un-interpreted flags
- Explore generating code as a method of diffing
.xib
files