How to create tableview like iphone ringtone setting? - ios

I am new to xcode and obj-c and creating my first iphone app. Right now, I am trying to display 2 NSMUTABLEARRAY data to TABLE VIEW, they are Name and Level. I want to display it like iphone's ringtones setting style:
john 1 >
Kate 2 >
... so onlevel is a value of 1-5 and editable. When user tap on certain row, let say tap on kate, it will display : 1✓ 2 3 4 5
and i can change the value of level by taping it and store new value to corresponding array. So let say i tap 5, the table will change too:
john 1 >
Kate 5 >
... so on
How do i do that?? Or is there any tutorial that closely show how to do that?

Lots of useful tutorials here: http://www.raywenderlich.com/tag/uitableview

Related

XLForm multi level selectors

I'm working on a very old iOS project that is using XLForm. I have to support a dynamic screen flow such as this attached
As XLForms is no longer on active development, I thought of asking the question here.
I've tried using XLFormOptionsObject and using a formSegueIdentifier to fully go custom but has not been that much helpful. If anyone has experience on a similar type of implementation using XLForms, any advice is really appreciated.
Side question;
I can intercept the Screen's C selection on Screen B using formRowDescriptorValueHasChanged, but how do I then manually pass that back to Screen A to update it's value?
Screen A
- Select Option > (tap pushes to Screen B)
Screen B
- Option 1 (tap selected option 1, pops and updates screen A row value)
- Option 2 (Same as option 1)
- Grouped Options > (tap goes to screen C)
- Option 3 (Same as option 1)
...
Screen C
- Option 1 from Grouped options (tap selects option 1, pops Screen C & B to go to A and updates screen A's row value)
- Option 2 from Grouped options (same as above)
...

Chartboost Reward Video Always Shows Up As "Earn 1 Coin." How Can I Change That? (Swift)

Ok so I recently integrated Chartboost ads into my app. I created a reward video button, but I want to change how it says "Earn 1 Coin" to "Earn 10 Coins." How can I do it?
Here's what code runs if the button is pressed:
Chartboost.showRewardedVideo(CBLocationMainMenu)
There's a dashboard option to change this, please refer to this link to their helpsite, it should tell you everything you need to know.
https://answers.chartboost.com/en-us/articles/201220275#custom-rewarded-video-behavior
Here is the solution :
1. Go to your Dashboard of Chartboost
2. Select your current app
3. In App, go to App Setting drop down menu
4. Select Rewarded Video
5. Now You will get the option Reward Per View to change that value

Highlight subtitle's playing line- iOS

I'm trying to make an Karaoke app and I want to show at least three lines of lyrics and highlight the line which is playing. Now I'm adding an .srt file as subtitle. I want to know how I can show the subtitle in a textview and detect the playing line and highlight it?
Subtitle example:
00:00:01,242 —> 00:00:02,550
line one of lyrics
2
00:00:02,551 —> 00:00:04,104
line two of lyrics
25
00:02:05,458 —> 00:02:07,158
line three of lyrics
or if I need to add any other type of text for my subtitle?
I was searching and found a solution that I can use .kar file but I couldn't find any example or explanation of it's instruction.
Thanks in advance :)

When will gestures to select specific values from DatePickers and ValuePickers become possible with the new UI Testing framework in iOS 9?

Right now, I am able to set accessibility labels and identifiers for different picker wheels in my application so that the recorder can pick up when I tap these picker wheels, and I am able to swipe up and down to modify the values, but I am unsure if there is a way for me to specify an exact value to select in these pickers. I am currently running XCode 7 Beta 5 and here is the following code I currently have:
//Expands the cell with the DatePicker
XCUIApplication().tables.staticTexts["Due Date"].tap()
//Modifies the Month, Day, and Year picker wheels.
XCUIApplication().tables.cells["dueDate"].pickerWheels["August"].swipeUp()
XCUIApplication().tables.cells["dueDate"].pickerWheels["19"].swipeUp()
XCUIApplication().tables.cells["dueDate"].pickerWheels["2015"].swipeUp()
As I mentioned, this code works fine, but I kind of have to guess at what the end result would be based upon the current start date (which is the current date, in our app) instead of being able to set the date to a known value.
Has anybody else been running into this same issue? If so, are there any known work arounds? It seems like the set of gestures that the API can mimic are still fairly limited.
Per this post starting in Beta 6 you should be able to do something like this...
app.datePickers.pickerWheels["2015"].adjustToPickerWheelValue("2005")

Xcode/Objective-C implementing a players turn toggle

I'm new to the whole VCM programming structure and more specifically to objective-c.
Right now i'm working on an iOS app that is like the game "connect 4." This Xcode project is my practice project that i've been using to play around/learn how to make iOS apps so there are several files and lots of commented out code, so Ill try my best to provide the necessary content from my project.
App State:
Right now I have a 10x10 grid of blue square/buttons. I'm still in the early stages of implementing the functionality of the game. Rather than making each square its own button, I created 10 frames and 10 buttons. Each row is a single button, which is broken up into 10 squares.
I currently have the squares change their color to red and become disabled once clicked. If I click multiple times.. the squares turn red when pressed. Heres a screenshot example run:
What Im wanting to do:
I want to build off of what I have, but not exactly sure how to keep track of which "players turn" it is. For example.. I want the first clicked square to turn red, representing player1's move. I want the second click to turn the button, say green, representing player2's move.. then the next move will be player 1's move.
I know Ill have to make sure the button is/was ENABLED and valid before switching which players turn it is.
How should I go about doing this? This is more of a general question, but I'll provide needed code snippets if necessary. Thanks!
In your .h file add an integer (variable)
int Turn = 1;
In your .m file you can do:
if(Turn == 1)
{
// Player one is playing
Turn = 2;
}
else if(Turn == 2)
{
// Player two is playing
Turn = 1;
}

Resources