balram3429 / btsimplepopup Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
I could not create the actions array with dispatch_block_t in swift 2.0
The below code works well in Swift1.2, but not in Swift 2.0
var menuView: btSimplePopUP!
let imgs = [UIImage(named: "pickImage.png")!,
UIImage(named: "takePicture.png")!,
UIImage(named: "pickVideo.png")!,
UIImage(named: "shootVideo.png")!,
UIImage(named: "recordAudio.png")!,
UIImage(named: "quit.png")!] as NSArray
let titles = ["Images",
"Capture",
"Videos",
"Shoot",
"Record",
"Cancel"] as NSArray
let actions: [dispatch_block_t] = [{self.pickImages()},
{self.takePicture()},
{self.pickVideos()},
{self.shootVideo()},
{self.recordAudio()},
{self.closeView()}]
menuView = btSimplePopUP(itemImage: imgs as [AnyObject],
andTitles: titles as [AnyObject],
andActionArray: actions as NSArray as [AnyObject],
addToViewController: self)
self.view.addSubview(menuView)
menuView.show(BTPopUpAnimation.UPAnimateWithFade)
Is there any way to use btSimplePopUp in Swift 2.0?
btSimplePopUP.m:76:24:
Comparison of distinct pointer types ('UIImage *' and 'CIImage *')
Is there not a Cocoapod for this? http://cocoapods.org/?q=btsimple#create_a_pod
Hello Balram,
I am trying to implement the btSimplePopUp and followed the instructions in the Readme, but the images are not displaying. What am I missing?
Thanks,
George
ENV: XCode8.3.1, iOS9,Objective-C
Error:
btSimplePopUP.m:247:17: Incompatible block pointer types sending 'void (^)(bool)' to parameter of type 'void (^ _Nullable)(BOOL)'
ios8 on iphone6 seems to have a problem with creating screenshots - it causes a flicker type effect from a difference in resolution somewhere. This happens just before displaying the popup window.
UIImage *screenShot = [sender.view screenshot];
This method seems to work fine:
CGSize size = [[UIScreen mainScreen] bounds].size;
UIGraphicsBeginImageContext(size);
[[sender.view layer] renderInContext:UIGraphicsGetCurrentContext()];
UIImage *newImage = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
This is right before:
UIImage *blurImage = [newImage blurredImageWithRadius:10.5 iterations:2 tintColor:nil];
Hope that helps.
Is there any possibility to change animation? For example: fade in instead of slide up/down
On line 14 of simplePopUp.m, I keep getting this error....
typedef void (^completion)(BOOL success);
any idea what I can do to fix it? I've sourced out your h and m's into a test project. I changed the above line to:
typedef void (^completion)();
and the app compiles and runs without error. Question: Did I break something I don't know about by modifying the block?
Thanx in Advance
Is there a plan for supporting the landscape mode as well ? I can see two behaviors : rotating and scaling the contentView so that it fits the landscape mode, or somehow prevent the rotation of the view (allowing other views of the parent viewController to rotate).
Great stuff by the way !
currently, it use nsarray of action, probably having delegate of action instead of nsarray of action might help in duplicating the code for each nsarray action.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.