Coder Social home page Coder Social logo

eaintroview's People

Contributors

alettehn avatar algrid avatar arrnas avatar brettthepark avatar bryant1410 avatar davidevincenzi avatar dev4dev avatar ealeksandrov avatar forthenature avatar hodgesmr avatar jakesc avatar jallen avatar jeksys avatar jschmid avatar kohtenko avatar legoless avatar maciejtrybilo avatar pajai avatar pws5068 avatar rafaelkayumov avatar seanooi avatar tommybananas avatar voyager163 avatar woildan avatar wzbozon avatar x1024 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

eaintroview's Issues

Exception under iOS 5.0

Currently, it is not possible to use EAIntroView under iOS 5.0. The following lines causes an exception:

self.pageControl.translatesAutoresizingMaskIntoConstraints = NO;
[self addConstraint:[NSLayoutConstraint constraintWithItem:self.pageControl attribute:NSLayoutAttributeCenterX relatedBy:NSLayoutRelationEqual toItem:self attribute:NSLayoutAttributeCenterX multiplier:1 constant:0]];
[self addConstraint:[NSLayoutConstraint constraintWithItem:self.pageControl attribute:NSLayoutAttributeCenterY relatedBy:NSLayoutRelationEqual toItem:self.skipButton attribute:NSLayoutAttributeCenterY multiplier:1 constant:0]];

at buildFooterView.

buildUI should not set black background

In EAIntroView.m, line 185 in buildUI method the background color should not be black. Set it to clearColor or make it customizable

self.backgroundColor = [UIColor clearColor];

It's a step forward to achieve this: #71

add ability to set/change view alpha

add the ability to set/change the view alpha in order to create transparent overlays over the user interface.

EAIntroPage *page1;
page.alpha = 0.5f;

Back button of navigation bar causes the app to show up again the intro view

Hello,

I have added two buttons inside all pages of the intro view :

  • Login button : it just calls the [self.intro hideWithFadeOutDuration:0.2 ]; and show the container view of the intro view which id a login view that have a uinavigationcontroller
  • Sign up button : it calls the [self.intro hideWithFadeOutDuration:0.2 ]; and push the sign up view using the uinavigationcontroller

The problem is : hitting the back button causes the introview to show up again instead of just back to the login view that pushes the sign up view, here is an animated GIF that shows the problem :

Link : https://f.cloud.github.com/assets/4885143/1316238/abd5fa70-3292-11e3-9282-2cdf674a419c.gif
Image :
navigation

here is the actions of the two buttons :

-(void)loginClicked:(UIButton *)sender
{
     [self.intro hideWithFadeOutDuration:0.2 ];
     self.navigationController.navigationBarHidden = NO ;
}
- (IBAction)SignUpClicked:(UIButton *)sender
{
    [self.intro hideWithFadeOutDuration:0.2 ];
    self.navigationController.navigationBarHidden = NO ;

    SignupViewController *signUp = [[SignupViewController alloc] initWithNibName:@"SignupViewController" bundle:nil];
    [self.navigationController pushViewController:signUp animated:YES];
}

Page Control in iOS 8

Setting the pageControlY value doesn't seem to do anything in iOS 8. Is anyone else having this issue?

Crash if scrolling while dealloc

if the view is dealloced while still scrolling it will crash with:
EXC_BAD_ACCESS
on:
[UIScrollView(UIScrollViewInternal) _delegateScrollViewAnimationEnded]

I've came across these kind of exceptions before in other controls and even in UICollectionView (just gooogle: _delegateScrollViewAnimationEnded).

This issue can be fixed easily by setting the scrollView.delegate to nil on dealloc:

-(void)dealloc {
self.scrollView.delegate = nil;
}

Is it possible to add UIButton without edit EAIntroView source code?

I use showIntroWithCustomViewFromNib method and try to add UIButton(signup) on nib. And then link button to an action. And the error happen:

reason: '-[EAIntroPage show:]: unrecognized selector sent to instance

so is it possible to add UIButton without edit EAIntroView source code?

thanks a lot.

Transition to autolayout

There are any plans to support layout constraints for all UI elements (e.g title and description)? For example, in an iPad could be useful to have a full support for portrait/landscape.

pageControlY not working in iOS8

Hi,

somehow, the pageControlY value is not working on iOS8.
This is a screenshot from iOS7, with pageControlY = 140.0f;:
Screenshot iOS7

This is a screenshot from iOS8, the code is exactly the same:
Screenshot iOS7

As you can see, the PageControl is all the way up at the top of the screen.

It seems, that on iOS8, pageControlY does not do anything at all, because no matter what value i set, the pageControl is always at the top of the screen.

iPad and Rotation

Please is possible implement the view for iPad?
If the view rotating don't rotating the interface.
Thz.
Great work.
;)

Page reloading

It might me nice to have some method that allows you to either reload the visible / current page or all the pages:

[introView reloadCurrentPagewithPage:page];

[intoView reloadPages:pages];

pageAppeared not being called for page 0

There is custom code in - (void)buildScrollView; to call pageAppeared for page 0:

if ([(id)self.delegate respondsToSelector:@selector(intro:pageAppeared:withIndex:)]) {
[self.delegate intro:self pageAppeared:_pages[0] withIndex:0];
}

But the problem is that buildScrollView is called from the init. When creating EAIntroView, you initialize and then set the delegate. Since the delegate is set after, pageAppeared won't be called on the first page 0. If you page to page 1 and then back to page 0, it will be called.

Add buttons in all pages

Hello,

1/ I want to add buttons in all pages, the same buttons just like Wunderlist app you can see it in action in this screen shot

1

after adding them how can I handle their actions, in other word, if the user is viewing for example the second page and then he clicked on the "sign up" button how to handle that

2/ I want to avoid the "Intro callback", I just want to implement for example 4 pages, when the user reach the last page he is stack there he only can back to previous views or click the buttons implemented in "1/"

Call IntroView from two differents View Controllers.

Hi! I need to call the IntroView from differents View Controllers in a differents moments and I want redirect to the correct destination in both cases when the tutorial finished. How can implement this in a introDidFinish without using segues? It's possible?

Not working in landscape on iOS7?

Hi,

I'm probably doing something wrong (or failed to find the correct documentation) but the library doesn't look to work properly in Landscape on iOS7. It does present the view properly in term of dimension but the scroll (and the pages) will stay as the app is in portrait.

Any idea what am I doing wrong?

thanks
Mauro
tutorial

Rotation support

Issue #19 is a closed issue that discusses orientation.

The demo app does not implement the orientation fixes.

screen shot 2014-10-05 at 12 48 16 pm

Not working correctly on iPad

Works great on iPhones, but behaviour and appearance is wrong on iPad. Only the top left quarter of the screen is pan-sensitive, label, dots and Skip are all incorrectly positioned. Is this fixable using a custom view?

screen shot 2014-02-26 at 16 50 24

I make skipButton showing with little delay time

leferi

If you want to make the skipButton like this GIF,
first you need to add one boolean type variable.
I named this penguinSkip.

And in EAIntroView.m 449line, there are ifsyntax about skipButton.
I little modified there like this.

#pragma mark FadingSkipButton
    if(self.skipButton) {
        if (self.penguinSkip == YES) {
            if(!self.showSkipButtonOnlyOnLastPage) {
                [self.skipButton setAlpha:1.0];
            } else if(page < (long)[self.pages count] - 2) {
                [self.skipButton setAlpha:0.0];
            } else if(page == [self.pages count] - 1) {
                [self.skipButton setEnabled:NO];
                [UIView animateWithDuration:1.24f delay:0.84f options:UIViewAnimationOptionTransitionNone animations:^{
                    [self.skipButton setAlpha:1.0f];
                    [self.skipButton setEnabled:YES];
                } completion:^(BOOL finished) {
                    if (finished) {
                        self.penguinSkip = NO;
                    }
                }];
            } else {

            }
        } else {
            if(!self.showSkipButtonOnlyOnLastPage) {
                [self.skipButton setAlpha:1.0];
            } else if(page < (long)[self.pages count] - 2) {
                [self.skipButton setAlpha:0.0];
            } else if(page == [self.pages count] - 1) {
                [self.skipButton setAlpha:(1 - alphaValue)];
            } else {
                [self.skipButton setAlpha:alphaValue];
            }
        }
    }
}

and in 560 line just add this code like this.

- (void)setSkipButton:(UIButton *)skipButton {
    [_skipButton removeFromSuperview];
    if (self.penguinSkip) {
        [skipButton setAlpha:0.0f];
        [skipButton setEnabled:NO];
    } _skipButton = skipButton;
    [_skipButton addTarget:self action:@selector(skipIntroduction) forControlEvents:UIControlEventTouchUpInside];
    [self addSubview:_skipButton];
}

That's it!
Now you can use it with [introView setPenguinSkip:YES]
And you control skipButton's delay and animation time in [UIView animateWithDuration:1.24f delay:0.84f options:UIViewAnimationOptionTransitionNone animations:

If you have any question, then comment here. Thanks.

Button is not clickable in `titleView`

Here is my situation.
I managed to display my button in the titleView. But somehow the button is not fired when I click on it.
The titleView is created by my custom view from an xib file. I even tried it with a callback method but no luck
How to fix this issue?

Deprecated method in iOS 7

EAIntroView/EAIntroView.m:155:146: sizeWithFont:constrainedToSize:lineBreakMode: is deprecated: first deprecated in iOS 7.0 - Use -boundingRectWithSize:options:attributes:context:

Have worked well in iOS 8?

In iOS 8, EAIntroView works well too, except only one thing.
That is a skipButton.

I use auto layout to the skipButton, but it works like this image.
Anyone know how can fix this skipButton in iOS 8?

eaintroview_bug

Bad access

Hi.

The method showInView: animateDuration generates automatically bad access
In my viewdidload i wrote this

EAIntroView *intro = [[EAIntroView alloc] initWithFrame:self.view.bounds];
[intro setPages:@[page1,page2,page3,page4,page5]];
[intro setDelegate:self];
intro.skipButton.hidden = TRUE;
intro.titleViewY = 10;

[intro showInView:self.view animateDuration:0.0];

Background Image on iPhone 3GS/4

I'm using your EAIntroView control, it works amazing, it is just what I needed but I have a few problems right now.

Which size should be a background image to show properly on iPhone 3GS/4? I have a 640x920 image but it doesn't show all of it. It gets cut about an 80% of height.

I tried resizing the image to taller and shorter values but shows exactly the same portion of image.

Do I need to change any property of the intro view / page ?

CocoaPod Issue - Invalid `EAIntroView.podspec`

When I add the line: pod 'EAIntroView', '~> 2.2.0' to my podfile I get the following error.

Pod::DSLError - Invalid EAIntroView.podspec file: undefined method `social_media_url=' for #<Pod::Specification name="EAIntroView">

from /Users/XXXXX/.cocoapods/repos/master/EAIntroView/2.2.0/EAIntroView.podspec:9

-------------------------------------------

s.author = { "Evgeny Aleksandrov" => "[email protected]" }

s.social_media_url = 'https://twitter.com/ealeksandrov'

-------------------------------------------

/Users/XXXXX/.cocoapods/repos/master/EAIntroView/2.2.0/EAIntroView.

When arrange with SMPageControl, old control is remained.

Hello guys, have use with SMPageControl? or play with EAIntroView example?
I find a bug, and I will show solution.

2014-07-11 3 11 02
Have you ever seen this View?
Yeah. It's a EAIntroView example.
But, this example has BUG.
Do you see skipButton? This skipButton is too big, like something is hidden.
So, I will kill this skipButton.

2014-07-11 3 13 46
Oh deer. What is it? We have two pageControl??
And this pageControl not works. So it's just a waste.

This waste is remained, when we arrange with SMPageControl.
So,, how can we get this waste out?
It's simple.

go to EAIntroView.m
then you can find - (void)applyDefaultsToSelfDuringInitializationWithframe:(CGRect)frame pages:(NSArray *)pagesArray function.
Find it? Then modify this line

self.pageControlY = 60.0f;

to

self.pageControlY = 0.0f;

or You can make a function.
i make a function like this.

- (void)hidePageControl {
      self.pageControlY = 0.0f;
}

then you just a call it. It's clear.

Not working without autoresizing masks

One of the very recent release broke one my apps which uses a UISplitViewController:

  • the screen is black
  • the title and desc texts sit in the lower right corner.

Not sure what changes broke it in EAIntroView, but last pull was from a few weeks ago and there was no issue then (and my app code has not changed in that area).

I'll send a sample project by email.

iOS 8

The build currently places all subtext on the first view in iOS 8 (devs only) - will this be fixed before the rollout in the fall? :) Thanks!

Images a squashed on 3.5" screens

Is there a way to tell EAIntroView that you're going to be on a 3.5" screen (iPhone 4S) so that it won't squash the background and title images?

Exception when opening EAIntroView a second time

Index out of bounds exception is thrown when:

  • Open EAIntroView and scroll to the end until it fades out
  • Try to open the EAIntroView again

Solution is adding the following on line 666 of EAIntroView.m:

_currentPageIndex = currentPageIndex;

Fadeout instead of cross dissolve

Hi, I want to use your rather awesome library, but I need a fadeout transition in between background images rather than a cross dissolve, will that be possible.

Do you have any ideas?

Thanks.

Support custom actions in XIB file

Would I be able to add two buttons in a XIB file โ€“ where tapping on a button could perform custom actions โ€“ such as sign up for account?

In your example, your XIB file has a UISwitch, is it possible to trigger action when user toggles the switch?

bool tapToNext property

Thanks for making a really useful library! I really like it!

I thought it would be cool if users can go to the next page just by tapping screens, since I found some people don't figure out how to swipe and just leave apps or tap the Skip button right away.

NSInvalidArgumentException under iOS8

I have some crash reports with the following:

Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** +[NSLayoutConstraint constraintWithItem:attribute:relatedBy:toItem:attribute:multiplier:constant:]: A constraint cannot be made between a leading/trailing attribute and a right/left attribute. Use leading/trailing for both or neither.'

All reports came from devices running iOS8. The problems lies in (EAIntroView.m:354)

iOS8 Beta 4 Crash

EAIntroView can cause a crash in iOS8 that is hard to debug. It is due to some constraints in buildFooterView. Commenting them out makes it work. Not submitting a PR because I want to see how it works without constraints, but wanted to leave a note to avoid other people going through this process:

        //[self addConstraint:[NSLayoutConstraint constraintWithItem:self.pageControl attribute:NSLayoutAttributeCenterX relatedBy:NSLayoutRelationEqual toItem:self attribute:NSLayoutAttributeCenterX multiplier:1 constant:0]];
        //[self addConstraint:[NSLayoutConstraint constraintWithItem:self.pageControl attribute:NSLayoutAttributeCenterY relatedBy:NSLayoutRelationEqual toItem:self.skipButton attribute:NSLayoutAttributeCenterY multiplier:1 constant:0]];

        self.skipButton.translatesAutoresizingMaskIntoConstraints = NO;
        //[self addConstraint:[NSLayoutConstraint constraintWithItem:self.skipButton attribute:NSLayoutAttributeTrailing relatedBy:NSLayoutRelationEqual toItem:self attribute:NSLayoutAttributeRight multiplier:1 constant:-30]];
        //[self addConstraint:[NSLayoutConstraint constraintWithItem:self.skipButton attribute:NSLayoutAttributeBottom relatedBy:NSLayoutRelationEqual toItem:self attribute:NSLayoutAttributeBottom multiplier:1 constant:-20]];

And the error:

'NSInvalidArgumentException', reason: '*** +[NSLayoutConstraint constraintWithItem:attribute:relatedBy:toItem:attribute:multiplier:constant:]: A constraint cannot be made between a leading/trailing attribute and a right/left attribute. Use leading/trailing for both or neither.'
*** First throw call stack:
(0x182a44be4 0x1924841ac 0x182a44b24 0x183a2cfd4 0x1838ba180 0x1002af18c 0x1002aca1c 0x1002ab7ec 0x1002ab5f8 0x1000fee68 0x1000db5e4 0x1000db510 0x1000dac04 0x100243f74 0x100243a3c 0x10026ed5c 0x192ad5b20 0x192ad5ae0 0x192ad977c 0x1829fc688 0x1829fa730 0x182928bd4 0x18b86b60c 0x18707aa0c 0x1000fe9ac 0x192afaa08)
libc++abi.dylib: terminating with uncaught exception of type NSException

IntroView as an IBOUTLET

Is it possible to have an init from Storyboard? So you could place the introView in the storybard and then in the viewcontroller's viewdidload make a call to set the pages?

I guess this falls into the reload pages bit? I'm finding that by adding the introview in code it does not follow the autolayout setup in the storyboard?

so for example if starting in landscape the images appear ok but when rotating to portrait the introview remains in portrait...

Crashing when using Swift

I can't get the intro view to run when using Swift. Just to make sure, I wrote the same code in Objective-C and it worked.

The error I'm getting is

2014-07-24 20:31:21.973 introview[5381:532663] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[__NSPlaceholderDictionary initWithObjects:forKeys:count:]: attempt to insert nil object from objects[0]'

Below is the code I have in viewDidLoad

var page1 = EAIntroPage()
page1.title = "Title 1"
page1.desc = "Page 1 description"

var page2 = EAIntroPage()
page2.title = "Title 2"
page2.desc = "Page 2 description"

var introView = EAIntroView(frame: self.view.frame, andPages: [page1, page2])
introView.showInView(self.view, animateDuration: 0.3)

Build Failed

I downloaded this class of zip, And I established 4 classes to Xcode project.
When I build my project, it became fail.
Failed cause is EAIntroPage.h.
I want to download the source that has been modified.
Or, please tell me how do fix this code.
version:
Xcode6.1.1
OS X Yosemite 10.10.1

Do not end intro

Is there a way to prevent the intro view from being removed after swiping past the last page?

I would like to use your control on my login screen to provide a slideshow to provide info about my app to encourage people to signup. See attached image. When the user swipes past the last page I want to transition page to the first page. And if someone swipes right on the first page I would like to go to the last page.

screen shot 2014-01-07 at 1 13 14 pm

Description is gone in iOS 6.1

Hi

Strange that the icon image view and title view is totally fine in iOS 6/7, but in iOS 6 the description is totally invisible. Not sure it's gone or just position isn't correct. Anyone encountered this before? Thanks.

Swipe gesture not always responsive

The behaviour of the swipe gesture is quite erratic. Sometimes I swipe a couple of views and stop to response in one direction, of during some seconds. Perhaps it's due to a wrong config from my side. Anybody with this issue?. By the way I'm using the storyboard integrated view

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.