Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KVO UIScrollView contentOffset #41

Closed
wants to merge 6 commits into from
Closed

KVO UIScrollView contentOffset #41

wants to merge 6 commits into from

Conversation

Frugghi
Copy link

@Frugghi Frugghi commented Feb 7, 2013

I merged your master and made the changes again, now automatically merge should work.

The noticeView scroll with the scrollView.
- merged #30 from master
- now WBNoticeView automatically add itself has observer for "contentOffset" when view is an UIScrollView
@Frugghi
Copy link
Author

Frugghi commented Feb 7, 2013

Mmm now there are duplicate commits, it's a problem?

(I need to learn how to use git correctly)

@plu
Copy link
Contributor

plu commented Mar 23, 2013

I'm currently struggling with the same wish: Make the NoticeView stick on top of my table view while the user is scrolling. Instead of making the NoticeView handle it correctly, a much simpler solution is to add the NoticeView to another view that is not the UIScrollView: Just add it to self.view.superview instead of self.view (which is supposed to be a UIScrollView). Maybe this helps you too :).

WBSuccessNoticeView *notice;
notice = [WBSuccessNoticeView successNoticeInView:self.view.superview
                                            title:@"You're offline, will submit later."];
[NSOperationQueue addNoticeView:notice filterDuplicates:YES];

@tciuro
Copy link
Owner

tciuro commented Mar 23, 2013

@Frugghi and @plu,

Is this issue solved now? Unfortunately I cannot find the time to verify this at the moment. Is it still an issue? Thanks for the help!

@Frugghi
Copy link
Author

Frugghi commented Mar 23, 2013

@plu
My NoticeView fork handle it correctly!

Your solution works (only) if the scrollview and its superview have the same frame.

@plu
Copy link
Contributor

plu commented Mar 23, 2013

@Frugghi you're right, my solution isn't flawless and it only works if the frame is the same. I could not test your fork though, it does not apply cleanly upon the current master anymore.
@tciuro it would be nice if NoticeView could handle scrolling and adjust the position while the user is scrolling, so it feels like the NoticeView is sticking to its current position.

@tciuro
Copy link
Owner

tciuro commented Apr 13, 2013

@Frugghi Sorry, but I cannot merge the fix automatically:

tciuro$ git pull https://github.com/Frugghi/NoticeView.git master
remote: Counting objects: 51, done.
remote: Compressing objects: 100% (18/18), done.
remote: Total 36 (delta 30), reused 24 (delta 18)
Unpacking objects: 100% (36/36), done.
From https://github.com/Frugghi/NoticeView
 * branch            master     -> FETCH_HEAD
Auto-merging NoticeView/en.lproj/MainStoryboard.storyboard
CONFLICT (content): Merge conflict in NoticeView/en.lproj/MainStoryboard.storyboard
Auto-merging NoticeView/WBNoticeView/WBNoticeView.m
CONFLICT (content): Merge conflict in NoticeView/WBNoticeView/WBNoticeView.m
Auto-merging NoticeView/WBNoticeView/WBNoticeView.h
CONFLICT (content): Merge conflict in NoticeView/WBNoticeView/WBNoticeView.h
Automatic merge failed; fix conflicts and then commit the result.
tciuro$ 

Could you please revise the change and try once more? Many thanks!

@Frugghi Frugghi closed this May 1, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants