I am trying to set up Page Control and I was using Apple's example of Page Control as a springboard to integrate into my app.
My main question is that in the Apple example it is using the initWithXib and I don't use that anymore. I drew it on storyboard and linked it to the class that I am pointing to when it's loading a scrollViewPage. It however does not show up? Is there a initWithStoryboard like the Xib?
After researching, I tried initWithCoder, but it didn't work or I coded it wrong.
Any guidance would be greatly appreciated.
Thanks!
Alan
Related
Hey everyone,
I'm looking to display multiple items in view of an iOS app. Typically I would use UITableView to accomplish this but now I'm looking for something a little fancier. The appearance that I hope to replicate is that of YouTube on iOS systems. A picture of this [youtube] is attached. I am particularly interested in how each video entry is styled. The box around the entry, the background. My guess as to how YouTube does this is through multiple UIViews or stylish UITableViewCell. Any class or framework recommendation would be of great assistance. I have spent hours searching google and stackoverflow to no avail.
Thanks in advance
To mimic the style of the YouTube app, I just subclassed UITableViewController with an initialized style of UITableViewStyleGrouped.
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 was reading a tutorial a while back and I saw a feature I would love to implement. It was a loading view that took the form of a UIAlertView, and you could customize the image in it and the text. If anybody knows what class that is it would be greatly appreciated. Thanks.
You perhaps are looking for UIAlertView Custom Graphics or Create a Custom Alert.
I am trying to create an instance of NSWindow that has a style similar to that of Pixelmator, pictured below:
http://ideaorange.com/files/2010/12/pixelmato-sprinklebig.jpg>">
Basically, I would like to know how to create a window similar to that style, with the black title bar. Would I have to write the entire window out in code? Or is it possible to do in interface builder? Much appreciated.
The HUD appearance is what you're looking for. Note, however, that it only applies to panels (like Pixelmator's palettes), not standard windows (such as document windows). It also does not apply to controls, such as buttons; Pixelmator's are undoubtedly custom.
This tutorial is a good place to start: http://cocoawithlove.com/2008/12/drawing-custom-window-on-mac-os-x.html
There's a load of work involved in developing your own windows so be sure you're up for the challenge.
And another note, be sure to review your code against Apple's AppStore policies, as some of the window theming examples out on the web do use private API's which Apple won't approve for distribution through the app store.
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.