- Easy to use
- Fully customizable
- Interface Builder friendly
- Simple Swift syntax
- Lightweight readable codebase
- iOS 9.0+
- Swift 4
To run the example project, clone the repo, and run SkeletonViewExample
target.
Using CocoaPods
Edit your Podfile
and specify the dependency:
pod "SkeletonView"
Using Carthage
Edit your Cartfile
and specify the dependency:
github "Juanpe/SkeletonView"
Import SkeletonView in proper place.
import SkeletonView
view.isSkeletonable = true
The Selectable
protocol dictates whether an item is available (isSelectable
), as observed by the size of the Overlay's dot.
public protocol Selectable {
var isSelectable: Bool { get set }
}
When you use elements with texts. SkeletonView
draws lines to simulate text lines.
Also, you can decide how many lines you want. If you set numberOfLines
to zero, then it will calculate how many lines you need to populate whole skeleton and it will be included. Instead, if you set to one, two or another number greater than zero, only it will included this number of skeletons lines.
Coming soon...
This is an open source project, so feel free to contribute. How?
- Open an issue.
- Send feedback via email.
- Propose your own fixes, suggestions and open a pull request with the changes.
See all contributors
MIT License
Copyright (c) 2017 swift-code
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.