App Template for iOS 7

Getting into LiveCode for iOS? Ask your questions here.

Moderators: Klaus, FourthWorld, heatherlaine, kevinmiller, robinmiller

Post Reply
endernafi
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 296
Joined: Wed May 02, 2012 12:23 pm
Location: New York
Contact:

App Template for iOS 7

Post by endernafi » Mon Dec 09, 2013 12:42 am

Dear LiveCoders,

I wanted to share an app template
which is made by me -and colleagues- to mimic some iOS 7 behaviors
but it doesn't rely upon strict api's
so it should work on iOS 6 or Android, even on desktop.
iOS7_appTemplate.zip
(14.08 KiB) Downloaded 296 times
Main features:
* The bottom navBar is now at the right-hand side of the screen, user have to slide from right to left to reveal it.
It's a useful approach to overcome the limitations of a handheld device's restricted screen-estate.
You have more field for the main screen and you have more field -even more by scrolling- for the menu.

* The user can go back to previous pages by sliding from left to right.
During the transition, the header bar or topBar changes with changing-transparency effects.
To accomplish this, we had to use a "One Card - Several Groups for Pages" approach.
Because LiveCode can't show different cards or substacks at the same time on mobile.
You should put your content into the relevant group.

* It has a simple scaling algorithm to support different screen sizes.
It's tested on all i-Devices but not on Android.
It doesn't use the resolutionIndependence of 6.5, btw.
Please check the stack script for the scaling code.

* App can keep history of previous pages between multiple run-times.
When you close the app, it records the active page and the previous pages then at the next run it remembers them.

* It shows also a simple approach for installing and content-updating issues.
For this and more, don't forget to check the library stack.

Known Issues:
* The stack's poorly commented, sorry for that.
But thanks to the LiveCode's english-like scripting style, you wouldn't have much problem for understanding the code.
Feel free to ask anything related to it.

* To test it on a physical device, you have to update the provisioning profiles.

* Back button doesn't work and pages change without any transition effects;
I didn't implement these to keep the code as simple as possible.
Since, this is just a template.

* On physical devices, screen transitions have a noticeable lag around 200 ~ 300 milliseconds.
We couldn't come up with an acceptable solution for that, unfortunately.


Hope it helps to some of you, at least to some degree.


Best,

~ Ender Nafi
~... together, we're smarter ...~
__________________________________________

macOS Sierra • LiveCode 7 & xCode 8

fgr33n
Posts: 86
Joined: Wed Oct 15, 2014 3:14 pm

App Template for iOS 7 and Android

Post by fgr33n » Tue Oct 28, 2014 8:57 pm

Hi Ender,

Just want to let you know that I just tried this file on an Android Nexus 7, Gen2 (2013 version), with OS v4.3, and the pages and elements all scale and center themselves, as expected, with gestures and menu also working properly.

I also tried it on an iPad4 retina (v8.1), an old iPad1 (v5.1.1) and an iPhone5s (v8.1). It looks and works pretty identical, so mission accomplished.

I've been a developer for quite a while, but am totally new to LiveCode, so I'm really looking forward to studying your file to see how you did this. Thanks a lot for posting this file. Fred G.

endernafi
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 296
Joined: Wed May 02, 2012 12:23 pm
Location: New York
Contact:

Re: App Template for iOS 7

Post by endernafi » Wed Oct 29, 2014 12:16 am

Hi Fred,

I'm glad to hear that it works both on Android devices and on iOS 8.
Actually, I totally forgot that once I've coded such a template and posted it.
It seems that it wasn't a terrible script; kinda sluggish but enough for the job I guess :)

I would be more happy if you would find an actual use case for it, implementing it in one of your projects maybe.
As always; feel free to use it anywhere, anytime...


Best,

~ Ender
~... together, we're smarter ...~
__________________________________________

macOS Sierra • LiveCode 7 & xCode 8

jessamy99
Posts: 103
Joined: Thu Oct 25, 2012 3:23 pm

Re: App Template for iOS 7

Post by jessamy99 » Mon Dec 08, 2014 9:33 pm

Dear Ender,

Lovely to see you again!
You helped me so much in the past!

I love this template too!

Can you help me...
I want to play single notes, represented by buttons, move them into any order and play the resulting tune.

I want to save the resulting tune too.

I have looked everywhere and am stumped!

Thanking you in advance,
Jessamy

endernafi
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 296
Joined: Wed May 02, 2012 12:23 pm
Location: New York
Contact:

Re: App Template for iOS 7

Post by endernafi » Mon Dec 08, 2014 9:41 pm

Hi there Jessamy,
jessamy99 wrote: I want to play single notes, represented by buttons, move them into any order and play the resulting tune.
Can you help me...
Sure, I can but this issue probably deserves its own topic, don't you think?
We wouldn't wanna get our moderators angry :shock:
I'm joking of course, they are the kindest; but still, rules are rules 8)

Kindly open a dedicated topic, please
and let's see what can we do about your idea...


Best,

~ Ender
~... together, we're smarter ...~
__________________________________________

macOS Sierra • LiveCode 7 & xCode 8

jessamy99
Posts: 103
Joined: Thu Oct 25, 2012 3:23 pm

Re: App Template for iOS 7

Post by jessamy99 » Mon Dec 08, 2014 11:14 pm

Dear Ender,

You are right of course!
I will.

All the best,
Jessamy

Post Reply

Return to “iOS Deployment”