iphone

Unique identifier of an UIView object

房东的猫 提交于 2021-02-10 04:07:25
问题 I am having a following problem. When a certain touch occures on a UIVIew, I want to store this UIView's unique identifier (like let's say objectID) so that when I reopen my app again I can check if in the visible UIViews there is the one UIView with the unique ID from the storage. I do not want to store the tag values as object ids because they may not be unique and they are manualy set up. I need to get a unique identifier that is automatically assign by the system. Any ideas hot to get it?

play the sound from mic using the AUGraph

余生颓废 提交于 2021-02-09 15:28:22
问题 when i'am using the AUGraph to realize playing sound from the mic, i have a problem, in the device(iphone 3g), i can only hear from the right side of the headset, but it is well in the simulator, i can hear from both of the side of the headset. here are the code i use to connect the input to the output: AUGraphConnectNodeInput(auGraph, remoteIONode, 1, remoteIONode, 0); someone help me? tks! 回答1: output is double channel, input is also double channel. i find that the data from mic is single

play the sound from mic using the AUGraph

寵の児 提交于 2021-02-09 15:24:41
问题 when i'am using the AUGraph to realize playing sound from the mic, i have a problem, in the device(iphone 3g), i can only hear from the right side of the headset, but it is well in the simulator, i can hear from both of the side of the headset. here are the code i use to connect the input to the output: AUGraphConnectNodeInput(auGraph, remoteIONode, 1, remoteIONode, 0); someone help me? tks! 回答1: output is double channel, input is also double channel. i find that the data from mic is single

iOS - AudioUnitRender returned error -10876 on device, but running fine in simulator

六月ゝ 毕业季﹏ 提交于 2021-02-09 11:10:59
问题 I encountered a problem which made me unable to capture input signal from microphone on the device (iPhone4). However, the code runs fine in the simulator. The code was originally adopted from Apple's MixerHostAudio class from MixerHost sample code. it runs fine both on device and in simulator before I started adding code for capturing mic input. Wondering if somebody could help me out. Thanks in advance! Here is my inputRenderCallback function which feeds signal into mixer input: static

iOS - AudioUnitRender returned error -10876 on device, but running fine in simulator

夙愿已清 提交于 2021-02-09 11:09:55
问题 I encountered a problem which made me unable to capture input signal from microphone on the device (iPhone4). However, the code runs fine in the simulator. The code was originally adopted from Apple's MixerHostAudio class from MixerHost sample code. it runs fine both on device and in simulator before I started adding code for capturing mic input. Wondering if somebody could help me out. Thanks in advance! Here is my inputRenderCallback function which feeds signal into mixer input: static

Change “enter” key text on iPhone keyboard?

耗尽温柔 提交于 2021-02-09 07:11:22
问题 (This question concerns HTML pages in Safari, not app development in XCode.) In Safari on iPhone, when clicking on a <input> or <textarea> , the text on the enter key says "enter". Is it possible to change this text? I remember a posting saying something about using <textarea title="My button text"> , but this does not work when I tried it. 回答1: Note. You get the return key and keyboard types defined in the OS. Unless you want to try to hack the keyboard's view hierarchy to change that button

Change “enter” key text on iPhone keyboard?

大城市里の小女人 提交于 2021-02-09 07:10:56
问题 (This question concerns HTML pages in Safari, not app development in XCode.) In Safari on iPhone, when clicking on a <input> or <textarea> , the text on the enter key says "enter". Is it possible to change this text? I remember a posting saying something about using <textarea title="My button text"> , but this does not work when I tried it. 回答1: Note. You get the return key and keyboard types defined in the OS. Unless you want to try to hack the keyboard's view hierarchy to change that button

Change “enter” key text on iPhone keyboard?

断了今生、忘了曾经 提交于 2021-02-09 07:07:15
问题 (This question concerns HTML pages in Safari, not app development in XCode.) In Safari on iPhone, when clicking on a <input> or <textarea> , the text on the enter key says "enter". Is it possible to change this text? I remember a posting saying something about using <textarea title="My button text"> , but this does not work when I tried it. 回答1: Note. You get the return key and keyboard types defined in the OS. Unless you want to try to hack the keyboard's view hierarchy to change that button

Run javascript without UIWebView possible?

微笑、不失礼 提交于 2021-02-08 15:22:06
问题 Is it possible to run some javascript code (having perhaps an NSString as input) without using a UIWebView ? I would like to run this code in a separate thread so UIWebView is not possible and I don't really want to render anything, just get back the results. 回答1: I have not tried this, but here is one idea: Write code to allocate an empty UIWebView but doesn't add it as a subview anywhere, and just directly call - (NSString *)stringByEvaluatingJavaScriptFromString:(NSString *)script on your

iPhone/iPad front camera FOV

时间秒杀一切 提交于 2021-02-08 12:46:32
问题 There are some measured results available for certain older ios devices but I'm not able to find FOV numbers for newer models, specifically, iPhone 5s ~ 6s Plus and iPad 4 ~ iPad Pro. Also, the numbers listed on the above link don't match with some other calculated results. I'm aware that FOV number can be read using the following API NSLog(@"Camera's FOV is %f",myCamera.activeFormat.videoFieldOfView); However, since I don't have all the models available at hand and the read numbers that are