I'm working on an iPhone application that uses pulsating buttons and displays a clock.. so I need to synchronize the pulsating buttons with one another and with the clock display..
I'm no Core Animation expert, but so far the only synchronization mechanisms I have found work between CALayers of the same view. Am I missing something or is there really no way of synchronizing animations between views and with external events?
Any pointers in the right direction would be greatly appreciated!
BTW the app is specifically developed for iOS 5 should that make any difference.
Just answered something very similar recently. You'll need to use theCAMediaTimingprotocol. For more details and links to Apple's great video on this subject see my answer to this post:
If statement on NSNotificationCenter in iOS
Related
I am very new to Xcode and so as with auto layouts and i want to make my app which i've created, adaptive in a very easy way. I have seen lots of tutorials on internet but nothing helped me with my app. so i don't know how to make my app adaptive. so i need a help.
I have made an app that generate report in second view controller after providing inputs in first view controller.so i need to see how can i use auto layouts in my respective app to make it adaptive or there any easy way to get the results. i have seen all the videos related to it.
thanks in advance.
The best way is to use Auto Layout and Size Classes. This way your app will work with all iPhone sizes and all iPads. It will also behave correctly in portrait and landscape.
For more details, you will need to read and watch a lot of documentations/WWDC videos.
I am developing a Cocoa Application for Mac OSX. I intend to have multiple NSScrollViews and I'd like all of them to scroll at the same time if one of them is selected and scrolled.
I saw for UIScrollView there is a method "scrollViewDidScroll" that I could do this with an iPhone application.
Is there anything similar for NSScrollView or a way to go about doing this? Any help would be greatly appreciated.
Your solution is going to require that one of the scroll views will need to receive notifications that the other scroll view is being scrolled.
Apple actually provides some very nice documentation on Synchronizing Scroll Views, which also has some sample code snippets as part of it.
I'm developing a iPad app which has a popover which appears to show you a list of items. I need the ability to delete one of the items, so I'm considering adding the ability to press-and-hold (a.k.a. long tap) on one of the list items which would show another popover for that item, with an action list showing a delete button.
Two questions:
In terms of iPad UX, is this a good idea? Haven't seen it anywhere, and I guess it could be a little confusing...but how else can I do this?
Is this possible, code wise? I haven't tried it, but I am still pretty new to iOS development so I could see myself fumbling round for hours before finding out there's a technical reason why it's not possible.
Thanks!
It's not a good idea, and I don't think it's possible even though it's possible.
Apple's Human Interface Guidelines clearly state that you should not do it. This is as definitive an answer as there can be regarding UX.
For inspiration on how to delete items without requiring a popover, look at how UITableView does it, for instance.
Often, you'll have an Edit button in the top toolbar inside the popover to trigger edit mode.
If you want some kind of confirmation dialog, use UIActionSheet. They look good and work well enough, especially in popovers. In your case, I think these are the way to go.
In my app I want to show multiple views one after another to show multiple values when the user slides his finger on the screen, just like photo album. I want the same animation. Can anyone explain how I can achieve this?
You can store the images in an array... By using the UISwipeGestureRecognizer you can able to do the photo album.... if you have any doubt communicate with me...
I suggest looking at one of the WWDC 2010 sessions, I believe it was called "Designing apps with scroll views", it basically builds the exact thing your looking for with UIScrollViews. Take a look at the video and the sample code - https://developer.apple.com/videos/wwdc/2010/?id=104 and the sample code should be here http://connect.apple.com/cgi-bin/WebObjects/MemberSite.woa/wa/getSoftware?code=y&source=x&bundleID=20645
PS! You have to be a iPhone Developer to access this content.
I am trying to design a feature in my application for the iPhone that simulates the Springboard feature (Main menu of the iPhone that allows you to view more apps), or the way Weather application works that allows you to flip between views.
Does anyone have any samples of this how I would go about doing this. It's seems very trivial but I am wondering if I am missing something that is already available either as an Apple example or someone who did a tutorial on this.
The image below show how the user would use it.
alt text http://www.agilitesoftware.com/SpringboardExample.png
As they slide their finger to the right (or left) the other image would begin to show up. And it would animate smoothly. The faster you swiped your finger the faster it would move to the next view.
Update: The other feature is that it should mimic the same feel when you slide your hand across the display that is snaps to the current view into place. It should not keep sliding across if there is more than 1 view to the direction you swiping your finger.
I've seen other applications use this so that is why I am asking.
This is accomplished using the UIScrollView with the pagingEnabled property set to true. Just add each of your views, adjust the contentSize, and it will automatically "page" to the width of the screen across the content.
There is a sample app (with code) with exactly this functionality on the iPhone developer site on Apple.com (I believe it's called "PageControl".) - I'd suggest checking it out.
d.
I'm writing an app that uses a similar UI. As NilObject recommended, we're using a UIScrollView with pagingEnabled=YES.
You may also be interested in this example code involving just two child views. I'm trying it out now; it's an interesting technique but I've had to write some additional special-casing code for some odd situations that resulted.
There's also another question on this site that asks about creating a grid of icons like the home screen.
I would check out Joe Hewitt's code from the Three20 project for this. It provides a nice interface and further refinement of the UIScrollView implemented as TTScrollView and TTScrollViewDelegate, TTScrollViewDataSource.