kentnguyen / knsemimodalviewcontroller Goto Github PK
View Code? Open in Web Editor NEWKNSemiModalViewController
KNSemiModalViewController
The presentSemiViewController: is not like presentModalViewController:, it not keep the presented view controller.
I'm sure i'm using the latest code (i pulled yesterday)
During trying to execute following code:
UIViewController * parent = [self.view containingViewController];
if ([parent respondsToSelector:@selector(dismissSemiModalView)]) {
[parent dismissSemiModalView];
}
An exception is given below:
Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Defaults must have been set when accessing options.'
I searched in history and found this kind of issue happened long time ago. However, how could this happen in latest version ?
Thanks so much if somebody could look into it
Hi,
I was playing around with your SemiModalViewController and sadly found out that there is no transition style that lets the modal view slide down from above.
Is it possible to add something like that?
fter the addition, the following questions arise:
ld: 1 duplicate symbol for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
If the semi modal view controller has a nib file with outlets it will cash
If it has uibuttons, it crashes when tapping on them
If it is a view controller / table view delegate with a table view inside it, crash happens when the table view delegate methods are called by the controller
Xcode doesn't provide info on where it crashed
All it shows is EXC_BAD_ACCESS
I want to update my KNSemiModalViewController
from v 0.3
to v 0.4
. I got the error bellow.
[!] Unable to satisfy the following requirements:
- `KNSemiModalViewController (= 0.4)` required by `Podfile`
How can i update my KNSemiModalViewController
version
hi,
is there any method for setting semimodalview's frame at startup?
i used standard objc code:
semiVC = [[KNThirdViewController alloc] initWithNibName:@"KNThirdViewController" bundle:nil];
semiVC.view.frame=CGRectMake(0, 50, 320, 410);
Hi,
This problem is more obvious on the iPhone4 because the Retina display.
I run the test, it takes almost 1s to do the screenshot on iPhone4 which is inacceptable. We can cut down the scale factor like:
UIGraphicsBeginImageContextWithOptions(target.bounds.size, YES, [[UIScreen mainScreen] scale]/4.0f );
But that is not a good solution for me. Do you have the better idea?
So after i show SemiModal and dissmiss it, and then i go ahead and popViewController it tries to pop to the semiModal which causes a black screen. Then i decided to remove the SemiModal viewcontroller from viewcontroller stack myself. But that causes a Unbalanced calls to begin/end appearance transitions
Is it only me that gets this problem? Should they on default be removed from stack/deallocated automatically? Or am i wrong?
In my app I am modaly displaying a viewController from a button in the semiModalView. It works great and appears how it should. Unfortunately, when I dismiss the viewController the semiModalView now fills the entire screen rather than being at the bottom as it should be. Is this an iOS issue (I've read some issues with doubling-up modal views)? Or is this an issue with the code?
PS Your tool is awesome, thank you for making it!
I have been using the KNSemiViewController for a project and it is used in almost all the views. But, I am experiencing some serious problems now.
I have a tableview and on selection of a cell, the semi modal view is presented but it does not finish there. There are few buttons which makes the semi view to flip horizontally. Since the view controller are retained, it works great with this flip view controller as well.
Now, this flip view also has some buttons and user interface elements which would present a modal view controller full sized but some serious trouble evolve when this new view controller is presented. The top portion of the view in the view controller always acts like a active part and so dismisses all the view controllers at once. And also if the UIToolbar is present with some buttons, I am not able to press the button and the view suddenly vanishes. This triggers the dismissSemiView somehow.
How can this issue be corrected in KNSemiViewController.
Well, if you could also explain me some better ways to achieve such effect, it would be much helpful.
I will really appreciate your response and help.
I might just be stupid :)
But I'm wondering - is it possible at all to put a navigation controller inside the semimodal?
When I try to do this, the navigation controller just ignores it, and fills the full screen.
Thanks!
With tabBar having "translucent" set to NO - opened semi modal window leaves black line in tabBar position after presenting the popup view
How it can be fixed?
Thanks
I show a semi-modal UIViewController
like so:
self.datePickerVC = ...
[self presentSemiViewController:self.datePickerVC withOptions:nil];
Now In my datePickerVC
I assume that viewWillAppear:
is called, before my ViewController is presented. This does not seem to be done by KNSemiModalViewController.
Hello! I'm thinking when implementing such delegation to be displayed or not the view etc ...
You see it useful?
A greeting
When attempting to presentSemiView, i'm seeing an strange anomaly wherein the semi modal view being displayed successfully, but the region of the view not occupied by the semi modal view turns opaque. Below is a quick video to show you better than I can describe. I assumed it had to do with iOS6 autolayouts at first, but after disabling autolayouts I am still seeing this issue.
https://www.dropbox.com/s/isrrcgkzsvbvbf7/KNSemiModal%20Anomoly.m4v
Have you seen this before? Or have any ideas what can be done to further troubleshoot?
Thanks,
Dave Carrico
[email protected]
Hi Kent,
Thanks for sharing your code. It's absolutely beautiful! In fact i think it looks better than what National Geographic has.
I have having some issues integrating it to my storyboard project.
I replaced [self presentModalViewController:navigation animated:YES]; with
[self presentSemiViewController:navigation];
The attampt was able to present the new view with Semi Modal style, but when executing the dismiss action in the new view, the application will crash without giving a clear explanation of the error.
I guess i am asking here is if it's possible for you to provide an example of how to use your code in a storyboard project.
Thanks,
Kevin
I in the ViewController present a ViewController menu, click on the menu button, push on to the next ViewController, pictures will be overlapping, fuzzy.
The following is a part of the code:
PopBlackViewController * PopBlackView = [PopBlackViewController new];
NSArray * arr = @[@"hello",@"push"];
[PopBlackView showBlackView:@"123" titleArr:arr];
PopBlackView.popViewBlock =^(NSInteger num){
if (num == 0)
{
NSLog(@"1");
}else
{
[self.navigationController pushViewController:[SendInvitationViewController new] animated:YES];
}
};
[self presentSemiViewController:PopBlackView withOptions:@{
KNSemiModalOptionKeys.pushParentBack : @(NO),
KNSemiModalOptionKeys.animationDuration : @(0.6),
KNSemiModalOptionKeys.shadowOpacity : @(0.3),
}];
Push to the next ViewController, overlapping images, fuzzy, pop back also can appear
When I put a mapView inside the SemiModal View Controller, its performance is very poor when I tried to pinch/zoom/navigate through the mapView. What is the reason behind this?
It might be a good idea to resize the shadow when orientation changes. Currently, if SemiModal is presented in portrait & the device is rotated to landscape, the shadow remains 320 wide.
After the addition, the following questions arise:
ld: 1 duplicate symbol for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
The Animation in a rotation is not really clean. If you have a UITabBar or / and a UINavigationBar and rotate the SemiModalView the TabBar and the NavigationBar is appearing during the rotation animation. After the rotation the screenshot is not showing the original state of the hidden background view.
There's no crash but, when call the method "presentSemiViewController", the slide up animation not working. It looks like "presentModalView animated:NO".
I can't solve the problem.
IIViewDeckController + KNSemiModalViewController.
Are you going to implement a landscape support? I'm using this for my app, but I need to implement landscape support. Thank you!
Hi
I love your work on this.
I installed it from Cocoapods. But the latest release (tag 0.1) seems too old.
Would you mind to update a more latest and stable version?
ld: warning: directory not found for option '-L/Users/sphairo/consulta-ios-client/client/build/Release-iphoneos'
duplicate symbol _KNSemiModalTransitionStyle in:
/Users/sphairo/Library/Developer/Xcode/DerivedData/client-bagorrbdyxhwjhcvgtjkwgkrpxjr/Build/Intermediates/client.build/Debug-iphonesimulator/client.build/Objects-normal/x86_64/MyViewController.o
x duplicate symbols for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
what does line mean in UIViewController+KNSemiModal.m
objc_setAssociatedObject(view, kSemiModalPresentingViewController, self, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
I create myView and make self(UIViewControler) strong ref to myView
When I pop View by presentSemiView:(UIView*)view
That line will mak myView strong ref with self(UIViewController)
When I dismiss ,myView will not remove this strong ref
This make myView strong ref to self(UIViewController)
and self(UIViewController) strong ref to myView
It make retain cycle.
Is this a bug?
or something wrong with my usage?
Thank you
Hi,
When I try to present a simple semi view from a quite complicated viewcontroller which contains a lot of thumbnails, the start of the presentation is delayed for quite a few seconds even on my iPhone 5. What's the cause and how can I fix it?
I added KNSemiModalOptionKeys.traverseParentHierarchy : @(NO), which helps a little, but still can see 1-2 seconds lag.
Thanks.
The library, please support the present UINavgationViewController?
The present UINavgationViewController, UIViewController covered the entire screen, set up the frame of doesn't work, how to control the view frame?
Thank you very much!
e.g optional push-back
withOptions:@{
KNSemiModalOptionKeys.pushParentBack : @(NO),
KNSemiModalOptionKeys.parentAlpha : @(0.8)
}];
Great library, thank you!
When I try to present UINavigationController with presentSemiViewController, the UINavigationController covers all screen, but I want it to present semily as method says.
Please look at screenshot (The wunderlist app do what I want):
https://www.monosnap.com/image/DaubNUql9mn1ArPC3qbmHLgCm
hi,
im using IIViewDeckController in my project.
presentSemiViewController works great, but when i hit the dismiss button in the modalviewcontroller, it gives error:
Assertion failure in -[IIViewDeckController kn_optionsOrDefaultForKey:]
Defaults must have been set when accessing options.
how can i solve it?
It would be nice to add functionality for presenting the semi-modal view from left or right side - with pushed background animation !
Thanks,
Ilias
Hi implementing the semi-modal view for display large text, display it for buttons, but also one view is for playing audio, the semi-modal is for the audio controls, but it crash - after track and trace it's creating a zombie
*** -[ListenAudioTourViewController performSelector:withObject:withObject:]: message sent to deallocated instance 0xb88f970
No i'm stuck, after spending 5 hours of searching and trying... is there a way to make this view playing an audio file?
Hi! @kentnguyen
1、when pop the ViewController, user panGestureRecognizer control modalViewController disMiss?
Jack
I use a UINavationController to push the first view controller, and then show the second one with this animation, when I tap the dismiss button(created by myself), it crashed!! So, I fixed it.
// This method doesn't suppose UINavigation model
The core code is this:
else if (isNavController)
{
// get the last but one, it should be last view controller for the showing view.
UINavigationController *nav = nextResponder;
UIViewController *lastButOne = nav.viewControllers[nav.viewControllers.count - 2];
NSLog(@"array:%@, \n%@",nav.viewControllers, lastButOne);
return lastButOne;
}
KNSemiModalViewController->master/KNSemiModalViewControllerDemo/KNThirdViewController.m:50:32: No visible @interface for 'UIView' declares the selector 'containingViewController'
KNSemiModalViewController->master/KNSemiModalViewControllerDemo/KNThirdViewController.m:42:32: No visible @interface for 'UIView' declares the selector 'containingViewController'
These two errors are shown when ever I try to build the project.
Hello,
First of all, thank you for this work. It looks great.
But, I have an error (6 in fact) when I add your module.
I have a "Use undeclared identifier 'KNSKNSemiModalTransitionStyleSlideUp'...".
It's the same error for each transition style in the .h line 46 to 50.
Looking forward to an answer, thank you in advance.
PS: it's ok on iOS 6 but not in 5 and the demo as the same problem.
Hi, first of all thank you for the control, I have used it in many projects with no issues whatsoever, it's great.
This time I would like to design a full screen semiModal child view controller in xib and use resize.
The idea is that the same xib should be initially displayed only 320 x 200, and when a button gets clicked it gets resized full screen, showing the rest of the controls below initial 200 height.
Do you think that possible? Can you give me some hints? If the same xib could not be used for this purpose I was thinking using the semiModal with a container and placing another view controller view inside the semiModal could work, but that sounds maybe over complex, do you think there's a simpler way?
Thanks,
F.
Hi,
I'm facing this error. Any idea how to fix it?
2013-02-07 14:34:21.261 XXXX[1605:907] *** Assertion failure in -[PKRevealController kn_optionsOrDefaultForKey:], /Users/xxxxxx/Work/xxxxx/codes/xxxxx/Pods/KNSemiModalViewController/Source/UIViewController+KNSemiModal.m:57
2013-02-07 14:34:21.263 XXXX[1605:907] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Defaults must have been set when accessing options.'
It happened when I tried to do this...
Cheers,
Mickey
I'm trying to finish a project, but I'm stuck on the buttons in a SemiView, I want to open another view with these buttons, I get crashes with any code I tried... Is it possible to open another view ?
Anybody did this already? It will be great if some body can help me with this finishing piece! ;-)
I am using TheSidebarController (like Facebook, Airbnb apps) in my app.
When I tried to integrate KNSemiModalView library in my project. It's not working at all. What's the main reason and how to make it run?
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.