Comments (4)
Have the same problem :( anyone already solve it?
EDIT: You can solve it with Delegation, I'm not sure if it is the best way to do it, but it solve the problem
from gecco.
Rotation isn't supported. I'll add to feature list.
from gecco.
If you need to support rotation, you could fix this easily by creating a subclass of SpotlightViewController
and override viewWillTransition
.
public override func viewWillTransition(to size: CGSize, with coordinator: UIViewControllerTransitionCoordinator) {
super.viewWillTransition(to: size, with: coordinator)
coordinator.animate(alongsideTransition: { context in
// do this only if you don't extend the bounds of the view as said in the next solution
self.spotlightView.frame = CGRect(origin: CGPoint.zero, size: size)
// present spotlight
})
}
Another solution would be to simply extend the size of the spotlightView
in the delegate method spotlightViewControllerWillPresent
. Still you would need to override viewWillTransition
to present the spotlight at the right position, but you won't need to update the frame
.
private func extendSpotlightView() {
let size = CGSize(width: self.view.frame.width * 2, height: self.view.frame.height * 2)
self.spotlightView.frame = CGRect(origin: .zero, size: size)
}
func spotlightViewControllerWillPresent(_ viewController: SpotlightViewController, animated: Bool) {
self.extendSpotlightView()
// present spotlight
}
from gecco.
Try this write to avoid the problem. Rotational support will also be reconsidered if requested.
from gecco.
Related Issues (20)
- enable interaction HOT 4
- Value of type 'SpotlightViewController' has no member 'spotlight' HOT 1
- carthage issue HOT 1
- Objective-C Support? HOT 2
- Swift 3
- Use Gecco swift2.3 ? HOT 1
- Would love to see more in depth tutorial/example on this project. HOT 1
- Swift 4 HOT 6
- Unable to init `RoundedRect` with frame HOT 2
- Issue with Toggle In Call Status Bar HOT 1
- Creating a new tag with Swift 4? HOT 1
- iPhone X support? HOT 1
- Cannot compile with xcode 10 and swift 4.2 HOT 2
- Cocoapods update HOT 1
- Update to Swift 5.0 HOT 1
- How to add text in addition to spotlight? HOT 1
- Support Swift Package Manager
- Support SwiftUI
- Support SPM: package.swift has no package.swift manifest
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gecco.