I want to do something special with MPMoviePlayerController; So that I can show option for user to select its own choice's subtitle. For example English or Spanish.
Currently, i am using mhergon/MPMoviePlayerController-Subtitles but it will just give support of using one subtitle.
I want to show options to user like this image:
If user will tap on Off then no subtitle will be shown (Its working); Now i want to give two language options; Means, two SRT files should work for one video and also they should be properly synced with video timing.
If any one experienced such a work then your help will be more appreciable. I was thinking to make some customisation work within mhergon/MPMoviePlayerController-Subtitles but it may be not good because originally, its writtern for just one subtitle.
I have done changes in mhergon/MPMoviePlayerController-Subtitles to add support of multiple subtitles. If any one needs it in future, please have a look at this library.
Related
Swift...
So I've got an existing app and I'm working on its appearance. The current task is customising the decimal pad that pops up when the user hits a textField.
I've looked around on how to make it but it always seems that you have to go into the iPhone/ipad settings and add the custom keyboard.
eg. This StackOverFlow Question
and they all seem to point to this same tutorial..
iOS 8: Creating a Custom Keyboard
My problem is that I don't want the user to have to go into settings.
So the question is....IS THIS POSSIBLE?
The following pic is what I want to use. I have made this in an XIB file through adding a target keyboard which makes the new folder with KeyboardViewController.swift , info.plist and NumPad.xib. Though i think I'm on the wrong track, can someone point me the right way please.
Also anyone know the exact dimensions this view should be.. assuming what I'm asking is in fact possible. Let me know if I'm not being clear enough!
NumPad.xib(pic)
Many many thanks,
Steve
SOLUTION: Thanks to Andrea for correcting my search keywords. It led me to this Stack Question which hopefully sends some others to the correct end of the internet that have mistakes custom keyboard with custom input views!
Sure it is possible without going into settings, but they are called custom input views.
You should look into inputViews here what Apple says about them Custom views for data input.
Basically when the user press a text field instead of loading the usual keyboard it loads an inputView that you specify, pay attention that custom keyboard term is misleading. If you google for tutorial you'll find most probably link like the ones that you found.
For a practical example check this tutorial or this, is a little bit old, but the principle are still the same
Originally I had a different post, just wanted to redo it to clean it up.
This is more or less the layout I wanted to go with. Imagine the first imageview had dog pictures, the second one had cat pictures and the third one had rabbit pictures. three folders contain a group of three separate sets of pictures.
What is the best way to set it up so I can randomly swipe, lets say the first image view where it would only show pictures of dogs.
What I am asking is, is there a certain way to create the file structures or link the pictures to each image view?
I have the basics of the random (something with a 4 in it don't remember the method exactly) and the basics of swipe, just was looking for help with linking the photos and file structure.
Please let me know if this still doesn't make sense.
Thank you
EDIT
after messing with this this is where I am at:
with a very simple array basically
catsArray: [String] = ["catpic1","catpic2"......]
then I have it set up as
let randomIndex = Int(arc4random_uniform(UInt32(catArray.count)))
if (sender.direction == .Right)
{
self.catImageView.image = UIImage(named: catArray[randomIndex])
}
just me hacking things off the internet. now I am running into an issue. after a few swipes I get a null images or its just blank. Why is that?
now that I have some of this set up I am debating if I should just use parse for a server or if there is a better way.
thanks
Either approach will work. It's probably a good exercise to write both versions. You'd learn from it.
Your question is far too vague. Are you worried about memory? If so, you should not load the images into an array. Instead load the image names, and load each image as it is swiped on-screen. You might want to load the current image and the next image so it's already in memory and can be displayed without lag.
Are you talking about using a UIPageViewController? That's a good class for managing a set of pages that you can scroll through. There is a sample app from Apple called PhotoScroller that illustrates that technique, along with tiling the images so you can display large images and handle zooming and panning. (The app is written in Objective-C however.)
EDIT:
Your updates make your question a little clearer.
There are lots of ways to handle this. Here's 1.
Create 3 separate folders, one for cats, one for dogs, and one for rabbits. (in your app's documents directory, or in the bundle, if the images will be shipped with the app.)
Use NSFileManager to create 3 separate arrays of filenames. Take a look at the methods contentsOfDirectoryAtURL:includingPropertiesForKeys:options:error: and contentsOfDirectoryAtPath:error:. You should be able to make either of those work.
Then you'll need to scramble your arrays of filenames to create a randomized order. You can use one of the block-based sort methods where your block uses a random number to determine the sort order of each pair of objects.
Finally you'll need to implement the swipe to switch.
It sounds like you are beginner so this is a lot to work through. You should break the problem into pieces and tackle them one at a time.
I want to customize a UIControlSwitch, but I have a doubt, Can I change the image of the selector of the switch also? I saw many tutorials , and they changes the size, text and Background, but I want make something similar to this( Mundial):
and additional I want to know if this is a UISwitch?
There are many controls which can do what you're asking. Have a look at CocoaControls, specifically on this page.
I would personally recommend using this one (if it has all features you need).
Before this question is dismissed, let me start by saying I've read the dozens of questions that sound similar. I haven't found anyone that has asked for this specific use case, though, so I'm going to give it a shot.
I would like to create custom images to use (similar to emojis) in a custom keyboard that can be accessed with the globe icon. I understand that I can create a custom keyboard inside my own app, but it will only work within that app. I also understand how the emoji keyboard works.
Is it possible to create a situation where if two people are using the app, though, that the keyboard could be used to input the custom images (emojis) and be viewed only by a receiving user that ALSO has the app - even if the keyboard is being used outside of the custom image keyboard app.
So, basically, there would be a set of images stored within the app and the custom keyboard would reference those images to display whenever the keystroke has been entered and then the receiving phone can locate those images stored within the app to display them (but this could all be done within the native SMS messaging app, not solely in the new custom image keyboard app).
I've researched this a good deal, but can't find a straight answer. Any help or direction would be greatly appreciated!
You could create your own Keyboard that creates somehow special Strings that imply an image. For example could a smiley be encoded like ".CoolSmiley". When you now want to display that text, you should search for patterns you want to recognise. That's how emoji is working. When you type in (y) it will get replaced by a thumb up image because it's recognising the string as a known pattern for a thumb up. This will of course just work inside your app.
New to iOS, I have to make an app that will show photos and videos.
Could be simple, but there's a little bonus.
The app will have to download configuration based on user. ( xml or json )
After downloading this configuration, it will have to download the elements to be shown.
The app will have to show , based on configuration file, views with buttons.
Each button can be used to show another view with buttons or a photo album, or a video, or a pdf.
I don't know where to start.
I tried to search on google but english not being my mother tongue, I think I don't have the right words to search on.
So any advice on how to structure that and how to make it possible ( nothing is impossible ).
I'm not asking for code, but for guidelines.
Regards
English isn't my mother tongue, but most valuable information in English. I would suggest to find informations in books, they are usually with downloadable examples. This can be useful for you.
Also you can try "ios recipes" in google.
Finally, my version of guideline:
Download configuration in applicationDidFinishLoad:withOptions:
Develop classes with view controllers + xib files, for each term(video, photoAlbum, etc.)
NavigationController or TabBarController to navigate between viewControllers. (There are too much examples with it. I like TabBarController, and "Each button can be used to show another view with buttons or a photo album, or a video, or a pdf." - this is too easy with tabBarController, tabs instead of buttons).
Something like that.