Giter Club home page Giter Club logo

knsemimodalviewcontroller's People

Contributors

alejandrojl avatar bartvandendriessche avatar dchohfi avatar dlackty avatar escherba avatar fdddf avatar jyn avatar kasperpihl avatar kentnguyen avatar lexrus avatar mrs- avatar rafaelalba avatar yangmeyer avatar yichizhang avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

knsemimodalviewcontroller's Issues

Exception: Defaults must have been set when accessing options

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

Addition: SlideDown

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?

Semi modal view crashes if it has outlets

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

pod update

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

Setting Frame at startup

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);

The screenshot cause a performance issue

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?

SemiModals stay in stack. Removing them from stack causes problems.

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?

Weird color appears on UIButton in Parent View Controller

iOS Simulator Screen shot Mar 18 2013 3 44 06 PM

You can notice on the UIButton in the Parent View Controller in the back ("Load earlier messages"), after being presented, there is a straight line of few colors appeared on that UIButton. I'm not sure why does this happen? Am I expected to do something to avoid this?

Thanks a lot!

Keyboard won't hide when semiModalView is shown

Just ran into this issue, which I believe should be part of this, even though it's not hard to work around this.

Edit:
I take it back. It seems not so easy to dismiss the keyboard before the semiModalView is presented. Could someone help me?

Adding screenshot to avoid too long explanation.

ksemi

Displaying a modalViewController from the semiModalViewController

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!

Flip side view controller

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.

UINavigationController Inside SemiView

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!

IOS 7 + no translucent tabBar problem

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

`viewWillAppear:` not called on the presented ViewController

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.

Implement delegate

Hello! I'm thinking when implementing such delegation to be displayed or not the view etc ...

You see it useful?

A greeting

Issue with semi-modal co-region opacity

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]

Hide > black tabBar

After hiding the modal (by pressing the background), my tabBar gets a black highlight. See screenshot.

Any idea how to fix this?

photo

Using in Storyboard structure.

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.

  1. I am using QuickDialog to create a viewController, the view is being present from tab view controller.
  • (IBAction)startReservation:(id)sender {
    QRootElement *root = [ReservationForm createSampleControls];
    UINavigationController *navigation = [QuickDialogController controllerWithNavigationForRoot:root];
    [self presentModalViewController:navigation animated:YES];
    }

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

Push to the next ViewController, overlapping images, fuzzy, pop back also can appear

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

error: linker command failed with exit code 1

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)

Rotation Animation Problems

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.

Landscape support

Are you going to implement a landscape support? I'm using this for my app, but I need to implement landscape support. Thank you!

How about a new release?

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?

linker command failed with exit code 1 (use -v to see invocation) on iOS 10 :(

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)

retain cycle problem

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

The start of presentation is delayed a few seconds

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.

using knsemimodalviewcontroller with IIViewDeckController?

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?

play audio in semi-modal crash (Zombie)

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?

Support gesture?

Hi! @kentnguyen
1、when pop the ViewController, user panGestureRecognizer control modalViewController disMiss?

Jack

UINavigationController cann't work fine

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

  • (id) traverseResponderChainForUIViewController {
    id nextResponder = [self nextResponder];
    BOOL isViewController = [nextResponder isKindOfClass:[UIViewController class]];
    BOOL isTabBarController = [nextResponder isKindOfClass:[UITabBarController class]];
    BOOL isNavController = [nextResponder isKindOfClass:[UINavigationController class]]; // Add this
    if (isViewController && !isTabBarController && !isNavController) {
    return nextResponder;
    } else if(isTabBarController){
    UITabBarController *tabBarController = nextResponder;
    return [tabBarController selectedViewController];
    } 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;
    } else if ([nextResponder isKindOfClass:[UIView class]]) {
    return [nextResponder traverseResponderChainForUIViewController];
    } else {
    return nil;
    }
    }

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;
}

Error while try to run sample project

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.

Screen Shot 2013-03-21 at 11 42 07 AM

Screen Shot 2013-03-21 at 11 41 51 AM

Error after added UIViewController+KNSemiModal.h

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.

Initially show only partial child view controller view and then resize to show it all

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.

Facing issue when using with PKRevealController

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...

  • (IBAction)done:(id)sender
    {
    UIViewController *parent = [self.view containingViewController];
    if ([parent respondsToSelector:@selector(dismissSemiModalView)]) {
    [parent dismissSemiModalView];
    }
    }

Cheers,
Mickey

Buttons to open another view

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! ;-)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.