Alt Button On Custom Keyboard in xCode - ios

It's the first time I'm creating a keyboard for iOS. I've created the first page with all the buttons but I don't understand how to add the second page.
For example: first page QWERTY, second page 123.
Is here anyone that can explain all the passages and functions/classes that I have to add on my codes and where precisely?
Thanks a lot

Well I haven't built a custom keyboard personally but I would make seperate views for the "pages" of keyboards and just hide away and unhide the view of the keyboard you want to show when the user presses the "alt" button. You could have as many keyboards as you like with this method and have it pre-built in the backround so that it would function very quickly to swap between them. Or animate them as you like really as views are easy to slide around. Actually sounds like a lot of fun as I have often thought about building a keyboard that has alpha-numeric values all in one, which would make filling in details on a login screen much quicker/more convenient.

Related

How to implement newsfeed comment page similar to Facebook or Instagram

Both Instagram and Facebook allow their users to comment on news feeds. In the comment scene, they basically have a UITableView with all the comments and a “footer” where user may enter comments and post them. So the “footer” is a UIView or UIToolBar with a UITextField/UITextView and a UIButton. Truly simple stuff from the look of it. Well I have been trying to implement it and the keyboard is not cooperating. I need the keyboard to not hide the “footer”. Especially now in iOS 8 the keyboard comes with a suggestions tool bar that a user may choose to show or hide. All these interactions make it difficult to keep my “footer” right above the keyboard while user is entering text. Every time I think I nail the solution, I find a multitude of bugs.
In one implementation, I use keyboard notification to listen for when the keyboard is up or going down (partly based on iPhone Keyboard Covers UITextField). The problem with this implementation is that there is a lag of about 1 to 2 seconds for when the keyboard shows up and for the “footer” to climb to the top of the keyboard from the bottom of the screen. A second issue is when user drags the suggestion toolbar to either show or hide it while typing, it causes my “footer” to move in unpredictable manners: which means I will need some static variables to meticulously track cumulative interactions with the suggestion toolbar just to fix that bug. Also notice that I put “footer” within quotation marks. That’s because I am not referring to a UITableView footer. But rather a view that I create beneath the table view as suggested by UITableView, make footer stay at bottom of screen?
Another implementation I tried was to use a “footer” and a keyboard ToolBar. When user clicks on the UITextField of the footer, that would cause the keyboard to show up with a replica of the footer as inputAccessoryView. This is basically to visually fool the user into thinking it’s the same footer that seamlessly climbs with the keyboard. But in reality I am using two compound Views: a “footer” and a keyboard toolbar. The first problem I encounter with this one is that I cannot seem to make the tool bar text field the first responder programmatically. This actually used to work in ios-7. But since I updated to iOS-8 it does not work. So if I do footerTextField.inputAccessoryView=keyboardToolBar and then in the textfield delegate method check if(textField==footerTextField){[tooBarTextField becomeFirstResponder];}, iOS-8 just ignores the whole thing or, worse, dismiss the keyboard and the toolbar altogether, so that in fact the keyboard never shows up when I click on footerTextField since the showing and dismissing happen so quickly.So again this used to work in iOS-7, but in iOS-8 it does not work.
a third approach was to make the parent view a TPKeyboardAvoidingScrollView such that I would have parent, and children UITableView and “footer”. Here while TPKeyboardAvoiding have worked for me on other scenes in the app, for whatever reason it’s not working here. My guess is because I am using a UITableView as one of the children of a UIScrollView.
a forth approach was to make my “footer” an actual UITableView section footer; section footer because I want it to float at the bottom. The problem with section footer is that they don’t stick to the bottom, which gives a visually erratic user experience as you scroll the table.
Ok, so I have said a lot. So finally, has anyone implemented a scene similar to Facebook’s/Instagram’s NewsFeed Comment scene? If so, will you please help me?
To recap: the Facebook/Instagram input textfield grows with text; sticks to the top of the keyboard whether the keyboard's suggestion toolbar is showing or hidden; sticks to the bottom of the screen when the keyboard is gone.
SlackTextViewController seems to fit all your requirements and is very well-written.

iOS: Need to add an Add button to a search bar

I need a search control that allows a user to search for something, then if they don't find it they push an add button to add it. I need the add button to display while the user is typing the text to search for, I'm thinking to the right of the text. If I put the button in the navigation bar, it doesn't display while the user is searching.
I want to use a Search Bar and Search Display Controller as I need the functionality of displaying results as the user types. The first answer here -- Adding button to left of UISearchBar -- doesn't seem to work with the Search Display Controller. When the user activates the search field, it disappears.
I have been down several rabbit trails on this:
In the second answer here -- Adding button to left of UISearchBar -- I see it recommended to override the Bookmarks button. That is very clever and works, but I can't figure out how to get the "official" Add button image to override with. The simulator doesn't seem to have the images anymore (?), and I don't like the idea of hardcoding something in my code anyway. I'd rather (re)use Apple's Add button icon, but I can't figure out how to do that.
I played around with creating a subclass of UISearchBar that is loaded from a nib that has the search bar and the button, but I'm realizing if I go down that path I think I have to reimplement the interface for UISearchBar and forward all of the method calls to the "real" UISearchBar that I am managing. That seems gross.
I tried just creating a view that subclasses UISearchBar and just dynamically adds the button at initialization time. But on that path I am very bogged down in the constraints. The constraints for the text field in the search bar are up a couple of levels in the view hierarchy, and I'm pretty sure there is at least one constraint up there that I will need to remove, agreed? (because the text field is currently constrained to extend to the end of the search bar).
I also tried the same subclass and trying to just set the positions of the controls in layoutSubviews, but when I do that I find myself having to position all the child controls in the search bar (including the Cancel button, etc.), and that seems wrong.
I'm still in learning mode, and I'm not on a tight schedule. I would like to do this the "right" way. Meaning I'd like to reuse existing code and functionality and just add an add button. What is the "right" way to approach this?
Thanks!

What iOS Control can overlay the detail like Toucharcade app

I have been searching for a UI Control and don't know what its called, which makes it tough to find right? What UI Control in iOS 5 or 6 provides a view overlay that can swipe away? Kind of the opposite of a slide-out nav view. I am looking at the TouchArcade app as an example, where you tap an item and this slides out an overlay with an article or review. Its also possible to have several overlay's that can swipe to the right for removal. Is this a custom control? I know this must be an easy question, I just don't know what its called, and therefore, my terms don't help much in Google. The closest thing I have found is ShinobiControls Overlays: http://www.shinobicontrols.com/shinobiessentials/
I'd rather just make my own than rely an somebody else's library I have to keep up to date. On the other hand, that one does look pretty good and would save me time.
Edit:
Picture of TouchArcade as an example overlay view.
You see how the article is presented over the list view below? What controls do that in iOS? It also allows multiple overlays as you click further into each item. You dismiss them by swiping them to the right, dragging them out of view.

iOS: UI Ideas for moving items between multi-level tableViews

I am building an iOS app that allows the user to browse a tableView, click a cell, then navigate deeper into another tableView using a navigationController.
I have a requirement to be able to move any of those items/cells to another place in the navigation stack. Right now my idea is, once the user selects the cells to move, to display a modal tableView that will allow the user to navigate through the same structure as before, but this time choose the location (by pressing and holding) to place those cells.
Are there any other UI ideas or clever programatic ideas that anyone might have that could be a better solution to this problem?
Perhaps take a look at how Apple's iOS Mail moves email messages between different mailboxes?
This also basically displays a modal view controller, but it flattens the hierarchy, by indenting nested items below their parent objects. You than just select the item that is the destination.
This of course only works if your hierarchy is not too deep, otherwise it's probably best to do it like you outlined it. The only thing I would perhaps recommend doing in addition, is to also have some sort of visual method (button?) to select the destination. A long press by itself might not be intuitive enough.

UIPickerView alternative for iphone something like combo box?

Are there any alternative controls instead of UIPickerView in XCode. If yes, how do they work? Can anyone suggest an alternative for UIPickerView?
You can see one in action if you download the free One Stop Plus app (women's clothes), drill down on the products until you get a view with Color, Size, etc. Tapping those buttons animates a table out of the button, with choices. Selecting one causes the table to animate back into the button. If you like that post a comment to this answer and I can tell you how to do it.
With iPhone interface, it is not feasible to enable a Combo box like a website. (I believe even Apple Guidelines would say not to do it). What you need to do is the use the UITableView to enable users to pick one option.
One thing you can do is decide whether you want to have the choice in a view shared with other controls. OR if your list if too long you can chose to push in a new view with only the choices on them and when a user selects one, the view will pop back one level.
Here is a screen shot of what i mean (maybe not the best example out there):

Resources