Closed farfromrefug closed 11 years ago
Hey Martin,
cool. Im not into hacking the core, but im sure i can make my module listen to willRotateToInterfaceOrientation. That should not be the biggest challenge. when im extending TiWindow, this should be possible. We should make this module together. To my experience, people are much more likely to use you contributions if it is a module rather than SDK hacks, due to the complexity and the rapid releases from appcelerator.
I would love to take a look at your code. if not a repo on github, then send me a copy me mail?
Please do a PR with your code.
Mads
Actually i dont think you will easily add it as a module. I had to modify TiRootViewController.m to add missing Code. You are missing code there https://github.com/appcelerator/titanium_mobile/blob/master/iphone/Classes/TiRootViewController.m#L603
If you manage to have willRotateToInterfaceOrientation i will send you all my code so that you can merge. I cant create a pullrequest as i am working in my private titanium_mobile branch. But as soon as i have something i m ok with (which could be this we seeing how fast it goes), i will push it to my github branch and will let you know.
I am not doing it as SDK hack, as soon as it is working i will create a pullRequest to get it included in the official release.
By the way, just managed to have any view used as left or right side. Doesnt need to be a window anymore. Makes a lot more sense
Hi good stuff! can you send me you changed in tirootcontroller.. Then I'll show you what I mean.
Suer here you go
- (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration;
{
windowOrientation = toInterfaceOrientation;
[super willRotateToInterfaceOrientation:toInterfaceOrientation duration:duration];
for (TiWindowProxy * thisProxy in windowProxies)
{
UIViewController * thisNavCon = [thisProxy navController];
if (thisNavCon == nil)
{
thisNavCon = [thisProxy controller];
}
[thisNavCon willRotateToInterfaceOrientation:toInterfaceOrientation duration:duration];
}
}
- (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation;
{
[super didRotateFromInterfaceOrientation:fromInterfaceOrientation];
for (TiWindowProxy * thisProxy in windowProxies)
{
UIViewController * thisNavCon = [thisProxy navController];
if (thisNavCon == nil)
{
thisNavCon = [thisProxy controller];
}
[thisNavCon didRotateFromInterfaceOrientation:fromInterfaceOrientation];
}
}
Hi Martin,
There you go: https://github.com/viezel/NappSlideMenu/blob/master/Classes/Ti/TiRootViewController%2BExtended.m
Now we have these two methods in the module.
swizzle of course ;) great job
hi, looking forward to see your code. it will be cool to have any kind of views in the side views :) you said that you are working on a android version as well. Seems like a bunch of work? Send me some code to look at, if you want any help..
Mads
Android version is now finished. iOS version almost done. In fact the hardest part is to find a working "cross-plateform" API. This widget is really "new" so both android and ios version get quite different.
Will make a pull request as soon as possible
Just so you know, ViewDeck is still very buggy. I ll need to fix it before i can release anything
sounds great. Im looking forward to the PR, and ill play with it. Yeah ViewDeck has its flaws, but nice UI result in the end. :)
Yes but i am actually looking at alternatives. May be https://github.com/edgecase/ECSlidingViewController
yeah, but its quite basic. I like the api of setting ledge, animationmode and the ability to push a new navcontroller. :) what bugs are you finding in the viewdeck?
I updated the module with proper TiWindow proxy resize. So the module should work fine now.
Ok so i think i finished my slidingMenu integration into Titanium. For the ios part, i decided not to use ViewDeck, instead i used my own version of https://github.com/edgecase/ECSlidingViewController https://github.com/Akylas/ECSlidingViewController
You can look at the code. Now as for the SlideMenu widget for ios i cant really make it public as it relies on my own private branch of titanium which too far away from the main branch Here is the code (did not include the headers) https://gist.github.com/farfromrefug/719541c9b51ce1b5ae2e https://gist.github.com/farfromrefug/5363ca878dc32a619d93
For the android version i used https://github.com/jfeinstein10/SlidingMenu. It s also my own modified version. It has the exact same features as the ios part except for one thing. Using windows in the android version seems impossible, so only work with views
Martin,
This is great stuff.. I had a look into the android version. nicely done. I can try to explain which part of the code that has dependencies to your modified SDK version? I want to see whats not possible with the current androdi SDK. We either might be able to create some smart moves in the module, or do PR to the timobile master branch. regarding your views vs. windows: I believe you are complete right. Its really hard to extend windows on android. // Mads
About my private branch, on android i could easily create a PR. It s on the ios side that i rewrote a lot of things. I completely rewrote the proxy/view creation system of Ti. It s now working as on android, the view is only created when necessary. That way i have a Titanium SDK with crazily smaller footprint, and most of all it allowed me to completely rewrote the tableview widget to use reuse of cell ....
Do PR! and start a dialog with them. If you optimize their work, they cannot argue that! :) They love contributors!
If you wanna keep code private, you could email me the android version? I would like to try to write this module aswell! its mm@napp.dk
Any updates here? Would be nice have a Android version of this module.
Thanks!
I have it working perfectly, but not as a module. It's integrated in my own private branch of the sdk. I will make a pull request when i can (right now my branch to far away from the master branch)
Hi Martin, could a have a look at your files?
watch your mails ;)
Hi viezel,
Your module is the best one I have found so far!
Any plans to support Android in the near future ? After review of a couple of sliders under android I think the SlidingMenu from jfeinstein10 is the most fluid. https://github.com/jfeinstein10/SlidingMenu
How hard would it be to include it into your dk.napp.slidemenu module? Would it be even possible? I have no experience when it comes to creating modules, I looked at the doc but am kinda lost...
Thanks for the help. Chris
Chris, I already did this. Look at my repo: NappDrawer
MED VENLIG HILSEN / BEST REGARDS
MADS MØLLER TECHNICAL PARTNER
Napp CMS ApS T: 42 42 80 60 M: 20 28 20 26 E: mm@napp.dkmailto:mm@napp.dk W: www.napp.dkhttp://www.napp.dk
On 10/10/2013, at 15.19, "chrisribe" notifications@github.com<mailto:notifications@github.com> wrote:
Hi viezel,
Your module is the best one I have found so far!
Any plans to support Android in the near future ? After review of a couple of sliders under android I think the SlidingMenu from jfeinstein10 is the most fluid. https://github.com/jfeinstein10/SlidingMenu
How hard would it be to include it into your dk.napp.slidemenu module? Would it be even possible? I have no experience when it comes to creating modules, I looked at the doc but am kinda lost...
Thanks for the help. Chris
— Reply to this email directly or view it on GitHubhttps://github.com/viezel/NappSlideMenu/issues/1#issuecomment-26052580.
Viezel,
Wow fast response, thanks! Sorry did not see that in your repo.... Looking at it right now !
Thanks again. Chris
On Thu, Oct 10, 2013 at 9:37 AM, Mads Møller notifications@github.comwrote:
Chris, I already did this. Look at my repo: NappDrawer
MED VENLIG HILSEN / BEST REGARDS
MADS MØLLER TECHNICAL PARTNER
Napp CMS ApS T: 42 42 80 60 M: 20 28 20 26 E: mm@napp.dkmailto:mm@napp.dk W: www.napp.dkhttp://www.napp.dk
On 10/10/2013, at 15.19, "chrisribe" <notifications@github.com<mailto: notifications@github.com>> wrote:
Hi viezel,
Your module is the best one I have found so far!
Any plans to support Android in the near future ? After review of a couple of sliders under android I think the SlidingMenu from jfeinstein10 is the most fluid. https://github.com/jfeinstein10/SlidingMenu
How hard would it be to include it into your dk.napp.slidemenu module? Would it be even possible? I have no experience when it comes to creating modules, I looked at the doc but am kinda lost...
Thanks for the help. Chris
— Reply to this email directly or view it on GitHub< https://github.com/viezel/NappSlideMenu/issues/1#issuecomment-26052580>.
— Reply to this email directly or view it on GitHubhttps://github.com/viezel/NappSlideMenu/issues/1#issuecomment-26054023 .
Hi,
I just wanted to report on my try at integrating ViewDeck and to let you know that you will face problems integrating it as a module.
Especially you ll have problem when rotating the phone. ViewDeck needs to receive "willRotateToInterfaceOrientation" which you wont be able to send to it (i truly think you cant but i might be wrong!)
I did modify the framework to allow that in my branch and i integrated ViewDeck directly. I already have something running pretty smoothly http://www.youtube.com/watch?v=gpIQJaoivmQ
I will share my code when it working on android and ios.
Thanks for your work