iphone - Restrict user from switching to video mode -


i have requirement in application in when choose take photo option,he should allowed capture photo , cannot switch video mode. , same choosing photo photolibrary should allowed choose available photos, should not allowed choose video.how can restrict user doing this? mode should set in source type it.

take @ mediatypes property of uiimagepickercontroller.


depending on media types assign property, picker displays dedicated interface still images or movies, or selection control lets user choose picker interface. before setting property, check media types available calling availablemediatypesforsourcetype: class method.

if set property empty array, or array in none of media types available current source, system throws exception.

when capturing media, value of property determines camera interface display. when browsing saved media, property determines types of media presented in interface.

by default, property set single value kuttypeimage, designates still camera interface when capturing media, , specifies still images should displayed in media picker when browsing saved media. designate movie capture interface, or indicate movies should displayed when browsing saved media, use kuttypemovie identifier in statement this:

myimagepickercontroller.mediatypes =     [[nsarray alloc] initwithobjects: (nsstring *) kuttypemovie, nil]; 

to designate available media types source, use statement this:

myimagepickercontroller.mediatypes =     [uiimagepickercontroller availablemediatypesforsourcetype:         uiimagepickercontrollersourcetypecamera]; 

Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -