嗨,我需要在iphone上使用嘟嘟声,但我发现的唯一一件就是这个
NSString *soundPath = [[NSBundle mainBundle] pathForResource:@"alert" ofType:@"wav"];
SystemSoundID soundID;
AudioServicesCreateSystemSoundID((CFURLRef)[NSURL fileURLWithPath: soundPath], &soundID);
AudioServicesPlaySystemSound (soundID);
[soundPath release];
Run Code Online (Sandbox Code Playgroud)
它是工作和良好的代码,但我需要导入alert.wav文件.但我宁愿做本机(内置)声音,如果存在.
谢谢你的所有答案cs.
嗨如何在HTML中按钮单击定义一个函数,我尝试过这样的事情:
<input type="button" value="sth" onclick="
<script type="text/javascript">
function hello()(
window.print();
var z =document.GetElementById('ogog');
z.inneHTML="hello";
<script>
">
Run Code Online (Sandbox Code Playgroud)
我必须在这里定义我的函数,因为我有代码生成一个网站,其中的标题我无法定义javascript函数,我想要一个按钮单击功能.这只是一个例子.这应该是什么样子?
如何测试核心数据数据库是否为空?我试过了:
NSIndexPath *path1 = [NSIndexPath indexPathForRow:0 inSection:0];
NSManagedObject *managedObject = [self.fetchedResultsController objectAtIndexPath:path1];
if([[managedObject valueForKey:@"date"] description]!=nil){SOMEFUNCTION}else{SOMEFUNCTION}
Run Code Online (Sandbox Code Playgroud)
谢谢
我需要有名单的建议的cities/streets/villages同时,我打字到搜索栏.我发现我必须实现contentProvider并且我做到了.现在,对于我输入的所有内容,我得到相同的结果:
"搜索结果"
虽然谷歌的地方应该回到的位置的正确的列表.有人能帮我吗?如何使我的搜索能够在googlemaps上运行?(我的意思是建议,Geocoder的东西已经完成).非常感谢
嗨,我必须开发一个应该能够共享pdf文件的应用程序.我必须创建一个服务,将我的应用程序作为.PDF文件共享的默认设置.
正如您在图片中看到的,我可以通过蓝牙/ Gmail /云端硬盘等分享PDF格式.我需要把我的申请放在那里.怎么做到呢?谢谢 :)
我正在开发显示图像的应用程序,我需要创建一个以1:1宽高比显示大图像的视图.
首先,我有一些72x72分辨率的缩略图.我已经把他们在ImageView,但即使我添加参数android:width="fill_parent"和android:height="wrap_content",图像也不会不的大小ImageView,但只在中间居中.
我尝试添加参数android:scaleType="centerCrop",水平调整图像大小,但高度保持不变.
我怎么能设置我的ImageView所有设备在所有设备上的宽度与父视图一样,它也应该是高度.
我可以以编程方式执行此操作,但我需要能够以XML格式执行此操作.
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
// The ImageView I am talking about above
<ImageView
android:id="@+id/invitation_imageview"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_margin="1dp"
android:scaleType="centerCrop"
android:src="@drawable/face_woman_smile" />
<ImageView
android:id="@+id/invitation_avatar_view_1"
android:layout_width="wrap_content"
android:layout_height="40dp"
android:src="@drawable/face_woman_smile"
android:scaleType="center"
android:layout_margin="1dp" />
</LinearLayout>
Run Code Online (Sandbox Code Playgroud) 我从XML读取了日期,它给了我日期就像的字符串DD-MM-YYYY.但是当我想将它添加到我的核心数据数据库时,SQLite将我错误排序,所以我必须将其转换为日期格式或字符串,如:YYYY-MM-DD.但SQLite不支持任何Date()或To_Date()功能.你能帮助我吗?
嗨,我想释放我的fetchedResultsController.
我想知道为什么viewdidunload在我按下基于导航的应用程序上的按钮时没有调用.或者我应该在其他地方发布它?
感谢帮助

嗨,我正在开发识别模式的Android应用程序,它正如你所见,但我必须面对过度匹配的问题.我已经读过它是因为我的匹配器过于敏感而引起的.为了匹配我使用这种匹配:
DescriptorMatcher matcher = DescriptorMatcher.create(DescriptorMatcher.BRUTEFORCE_HAMMING);
Run Code Online (Sandbox Code Playgroud)
...
matcher.match(descriptor1, descriptorLogo, matches);
Run Code Online (Sandbox Code Playgroud)
我也尝试实现,knnmatch()但它是reault我无法用该功能绘制Features2d.drawMatches()
谢谢你的任何答案,希望它能解决我的问题
android ×4
objective-c ×4
xcode ×2
android-xml ×1
beep ×1
cocoa ×1
cocoa-touch ×1
core-data ×1
database ×1
date-format ×1
google-maps ×1
html ×1
image ×1
ios ×1
javascript ×1
nsdate ×1
onclick ×1
opencv ×1
pdf ×1
scaletype ×1
search ×1
share ×1
sqlite ×1