how to close a method/function on iPhone xCode? - iphone

when your project is getting bigger and bigger we have to look for ways to make it more easy to read.
The point is, I want to close all my functions using any key short code in my Xcode, let see the picture attached to understand what I mean:
(I cannot set any picture becuase I need more reputation...)
Well I mean:
> - (void) process1 {
}
If we press on the row on top left, the process will get closed. How can I use a key short code to close all my functions/methods on my class (.m)?
Thank you!

Check the View→Code Folding menu for options and hot-keys.

I'm pretty sure it's here. You'll also find other cool stuff
Hidden Features of Xcode

Related

Info window on iOS?

I am trying to implement in my code something like an info window , but not exactly. I found a very nice tutorial here , Info Window for iOS , but what i want to do is when i press on my button , the space under it to expand and show my various options.
I mean i dont want another window to open , but something like a space under the button expanding , revealing stuff. Maybe you have seen this in applications with buttons with a + next to them , to reveal more info , and then with a - to hide it.
How exactly is this called on iOS and is there a tutorial you are aware of about it?
It would be good for you to look into UIView animation blocks. These will be useful in the future as well. This tutorial doesn't do the exact thing you are looking for because it is fairly specific, but this will tell you how to use animation blocks, and you should be able to turn that into what you are looking for. It is also a good thing to know.
http://www.raywenderlich.com/2454/how-to-use-uiview-animation-tutorial
It sounds like you are looking for a popup menu, which isn't really provided in iOS. But you can look at third-party controls such as this one:
http://www.cocoacontrols.com/platforms/ios/controls/qbpopupmenu

Custom Switch - Yes No Type - iPhone

Is there any chance of getting this above switch implemented? Any reference source would be helpful.
You can create Custom switch button with the Help of image. Create a switch button (Set Alpha below to 1) and place a image above UISwitch it will work perfect.
https://github.com/samvermette/SVSegmentedControl
https://github.com/samsoffes/sstoolkit
https://github.com/alinux/iPhone-custom-switch-UIView
This isn't going to be an answer to solve your question, as it is going to be more of a piece of UX advice.
This type of switch goes against Apple's HIG.
You should never display a segmented control or switch where the user will not be able to tell when the control/switch is "On" or "Off". If I were someone who hadn't used switches in an iOS application before, I would not be able to tell what's "On" or "Off" in the image above. It may be easy for you to determine this, but you need to consider the possibility of someone (with less intuition than you) using your application.
Hope this helps.
Take a look at this replacement UISwitch project.

Xcode Meanings. "window"

Hello StackOverflow people :)
I have a simple question regarding Xcode (cocoa) "Apple application maker"
Q : What is the name for the transition between 2 windows?
and do I make another "file" in the resources to make another window?
Thanks!
any extra details is appreciated
The transitions are just animations most of the time, but we can add in extra effects like fading and flipping depending on the type of the new window/view that we want to load. Within Xcode, the terminology to view and see a new window is called a "push" - as you push it onto the view hierarchy. To close it, you "pop" it off the stack.
And yes, you simply make a new file and then choose it's type to make another window - depends on exactly which type you are after, whether it's a code file or interface file etc.
Hope this helps.

Providing un-intrusive messages on an iPhone

This is kind of a silly question, but I cannot find the answer as I don't know the terms with which to search for it.
I am looking for a simple way of giving a 'status' message like 'Data updated' to the user without necessarily interrupting what he/she is doing (but have a option I guess in some instances to tab it an perform an action).
For example; some Apps give a rounded square semi-transparent with 'Lock screen/rotation' when an iPhone is rotated, I am look for something similar (or like the square box 'Build Complete in Xcode 4').
Is there an easy way of doing this?
Thanks a million in advance!
https://github.com/myell0w/MTStatusBarOverlay
MTStatusBarOverlay adds very subtle text to the phone's status bar. If you're looking for something a little more noticiable, try:
https://github.com/jdg/MBProgressHUD
As #kubi has pointed out, MTStatusBarOverlay is a good one, and I've passed Apple reviewer inspection with it. However I just found something that looks fraking awesome...
Tweetbot-Like Alert Panels (Blog), and the repository is MKInfoPanelDemo at Github.
Create a view that shows your message nicely, add it to the window, and start a UIView animation which makes it fade away. In the animation ended handler (delegate or block) remove the view.

How to Create the Highlight/Note Popup Buttons from the iPhone Kindle

I am wondering how Amazon did the highlight/note popup buttons in the Kindle app. After reading about UIPasteboard, UIMenuController, UIResponder, and UIResponderStandardEditActions, I am able to turn on or off standard edit actions (i.e. copy, cut, paste, select, and selectAll). However I haven't found a way to add a custom action yet. I would really appreciate it if I could get a pointer.
Thanks in advance!
Chris
(source: sampletheweb.com)
Edited by balexandre (added image instead link)
It looks like Amazon implemented their own custom view that mimicked the appearance of UIMenuController. I believe they did this rather than use SPI because if you click and hold on the Highlight cell, the arrow does not highlight, when it does in the real UIMenuController.
I don’t think there is a public interface to these controls, you’d probably have to code them yourself. (Or maybe figure out the private API, but that’s a slippery slope.) I am not sure about that, though, maybe somebody will prove me wrong.
That's a good point about the arrow part of the Notes/Highlight popup menu not highlighting, so they must be implementing their own.
However they are also obviously using a UIWebView, because it's recognizing tap and hold and they can highlight the text, and you can't get touch events from a UIWebView, much less get the information about what's selected. So how are they doing that?
This would be very useful for us to be able to do as well.
Use DTMenuController http://www.drobnik.com/touch/2010/01/dr-touchs-parts-store/
Costs 100 EUR ^_^
Custom menu items can be added via the UIMenuController's menuItems property. See Apple's UIMenuController docs.
the javascript part can be managed with jQuery, that's a fair simple and powerful library. i'm using it for resizing and rearranging things in a webview and it works great :)