Extending Three20 photo gallery? - xcode4

Hi I am using the Three20 SDK to create a gallery and it's all working great. I basically want to extend this so that when you see a large image there is an additional button on the bottom bar (by the > keys) so you can view some text about the image - I guess this is in principal the same as on the Facebook app where you can click the comments button and the photo flips over to reveal the comments.
Ideally a tutorial on this would be amazing but I guess that probably doesn't exist so I wanted to know the best way to do this was? Should I be adding new files into the Three20 directory to add this additional functionality? Or can I do it just in the one project where I need it?
Sorry to be vague, I'm a bit new to all this!

Generally, you shouldn't modify the three20 source code, unless it's a patch you're planning on submitting back to the three20 project.
If you need different behavior from TTPhotoViewController, you can subclass it and override any functions which doesn't fit your needs.
In your case, if you want to add a button to the toolbar, you should probably override (void)loadView, and replace the _toolbar with your own UIToolbar
Also, if you're only using the photo viewer from the entire three20 library, you will probably better off with a light weight solution, such as https://github.com/kirbyt/KTPhotoBrowser

Related

How to show an Image on top of a tabbed view in Xamarin.Forms?

I am using Xamarin.Forms and trying to achieve the next layout:
I want to keep the native look and feel for each platform (i.e: iOS tabs will be shown in bottom.), I just want to add an extra image on top of the tabbed view. I have been looking around and can't find any one providing a way for this to work. I just want to make sure and ask if this is actually doable in Xamarin.Forms while maintaining native look and feel for all platforms?
Is not possible (using Xamarin Forms) to do this. TabbedPage is a Control that fills the entire display.
Here there is a interesting discussion about "TabView".
I think you can use some other controls to try to do the same thing. For example, buttons + CarouselView.
Otherwise on GitHub there are some guys that have tried to implement what you need.. TabView

How can I add custom graphics in Qt designer?

I'm comfortable with C++ but brand new to Qt. I apologize for my ignorance as I'm sure this is a very simple question. I'd like to make a custom clickable widget, basically a push button that is just a black square with Qt designer, but don't have any idea on where to start.
EDIT: after fumbling around I think I'm an epsilon closer.
I created a black_box.png file. In the resource browser I created a new resource and prefix, and added the black_box.png. Any advice from here?
You have a few options for what you want to achieve.
You can use custom painting to draw a new button that subclasses QPushButton, this is reasonably involved and provides a huge amount of flexibility to build it to your requirements.
You can use Qt's stylesheets mechanism to style it, you can get more information on it here: http://doc.qt.io/qt-5/stylesheet.html
Or you can set a QPixmap of your image to be a button icon, and size your button to match it, there's a good answer on how to do this on this question: How to set image on QPushButton?

How do I use my own custom buttons and design with wxpython

I've been looking for some inspiration with wxpython as far as the GUI goes. Everything in the demo looks boring and uninspiring so I want to go in my own direction but I can't figure out how to use my own buttons I made in photoshop or my own background images.
I'm kind of new to GUI programming so I ask if you could please be clear in what steps I should take. Once I intialize the frame...how to I load my custom buttons, or set the panel background?
As acattle pointed out, I already wrote on how to change a panel's background. You should note that wxPython isn't a themable GUI toolkit. It uses the native widgets of the OS wherever possible and most of the time, those just aren't very themable. If you need that, then you should look at Tkinter's (especially ttk) or pyside/pyQt.
If you need bitmap buttons, there are several options:
BitmapButton
GradientButton
AquaButton
PlateButton
I did some googling and I found this tutorial for setting the background of panels.
A bit more googling and I found this post talking about wxPython's Bitmap Button Class and showing some code examples.
I would suggest being very very careful designing your GUI if you're going to use custom images. You need to pay special attention to your spacing and your text sizes or your GUI might come out looking like crap.

Customizing GraffitiCMS

I downloaded GraffitiCMS the other day(now open source and free), and like a lot of what I see, but what I really want to use it for, is to add CMS capabilities to an existing asp.net database/application.
Without getting bogged down with all the details of my app, can someone give me the basic 'approach' that should be taken to add custom content to Graffiti; content that won't be a 'post'?
I've seen for example, how to add custom-widgets to Graffiti - basically inherit from the widget class, compile your dll and plop it into the correct directory and it becomes part of the system. Is there a way to do something similar for the main content areas?
For simplicity sake, pretend I have a non-graffiti database with gig's of data that I want to display on the website using standard asp.net grid's and forms. I realize I could just go in and hack apart the source code to integrate my existing app, but that is likely not the correct approach.
Not looking for a complete solution her, just a pointer and what areas to investigate...thanks.
If you check out the latest source of Graffiti (or the 1.3 branch that was recently created), support was added to put widgets anywhere you want on any page. There is a new chalk function - $macros.Widget - that provides you with this ability. Dan Hounshell wrote a blog post on how you can use this new functionality:
http://danhounshell.com/blog/graffiti-cms-1-3-add-a-widget-anywhere-in-a-view-with-new-widget-macro/
If you're looking for something different than that, just let me know - we're working to make Graffiti even better for situations just like you are currently in.
What we have done to be able to integrate Graffiti CMS with our current ASP.NET projects is to create a post in Graffiti called "hidden" and then with our standard .ASPX pages we call a class in our Render Override that pulls the "hidden" post (ie: site.com/hidden/) and uses the header and footer to wrap the Graffiti theme around our custom .ASPX page. We use some HTML comments in the "hidden" post to be able to parse the header and the footer. It is kind of a hack, but has worked out really well for us.
I think you're trying to put the cart before the horse - depending on the size and amount of functionality, I would be looking to rebuild it after learning the development platform of my CMS system of choice.
I'm pretty much in the same boat right now. I have avoided Graffiti because I have to learn "Chalk" (whatever that is) and Umbraco (using XSLT for layouts is retarded). So far, this leaves me with Sitefinity at the top of my list and Telerik have just pulled the free version!
I may end up grabbing a very basic CMS which is easier to customize. I know this doesn't directly answer your question, but it may give you some food for thought :-)

Drupal: create content in popup/lightbox?

In Drupal, is there a way to create new content (based on a content type that uses CCK) in a popup or lightbox or similar technique?
There are at least two worlds that I know of:
http://drupal.org/project/popups_reference which uses http://drupal.org/project/popups
and
http://drupal.org/project/noderelationships which uses http://drupal.org/project/modalframe
Both of these are about creating the node in a modal in order to reference it via a node reference field. There might be ones for more general purposes, or you could probably adapt one of those. I've been enjoying noderelationships lately. Haven't tried the other recently.
The projects sprugman refers to are useful when you need to create a referenced node while you're adding another node. If you simply want to make the /node/add/[contenttype] link to open in a lightbox, try the Lightbox2 module.
There is a great module in Drupal automodal that works with Modal Frame API. What you need to do is simply add a new class 'automodal' to your links... and the magic is done for you.
Another one is the Modal Nodereference module. Here is a quote about it (from the module's project page):
... turns the nodereference widget into a modal popup allowing new linked nodes to be created on the fly. Because it uses an iframe, it should support even Javscript and file uploads within the sub-node.
The big feature: It should work with editors, image fields, and all of those other JavaScripting things. We built it precisely to meet those needs. We started with modalframe, instead of one of the other popup libraries, because we knew that we could make this work with TinyMCE, CKEditor, and ImageField -- libraries that have difficulties dealing with other popup APIs.
It depends on the Automodal module, as well as the excellent Modal Frame API module.

Resources