当我想访问UIView
当前的父级时,UIView
我UIView
在当前声明父级UIView
的父UIView
对象,并通过将父对象分配给当前视图的对象属性来访问它.
有没有办法摆脱这种情况并直接调用父视图的方法或属性?
我也试过(parentView *) self.view.superview
但没有帮助.
调用此对象的函数时会出错
[UIVIew unrecognized selector......
Run Code Online (Sandbox Code Playgroud) UITextField
按下清除按钮时有没有办法隐藏键盘?
我正在使用Robbiehanson的iOS XMPPFramework.我正在尝试创建一个MUC房间并邀请用户进入群聊室,但它无法正常工作.
我使用以下代码:
XMPPRoom *room = [[XMPPRoom alloc] initWithRoomName:@"user101@conference.jabber.org/room" nickName:@"room"];
[room createOrJoinRoom];
[room sendInstantRoomConfig];
[room setInvitedUser:@"ABC@jabber.org"];
[room activate:[self xmppStream]];
[room inviteUser:jid1 withMessage:@"hello please join."];
[room sendMessage:@"HELLO"];
Run Code Online (Sandbox Code Playgroud)
用户ABC@jabber.org应该收到邀请消息但没有发生任何事情.
任何帮助将不胜感激.:)
有谁能告诉我在iPhone上进行视频聊天的方式?我试图在很多网站上搜索但是徒劳无功.
我找到了这个链接:http: //code.google.com/p/xmppframework/wiki/iPhone
我不确定这是否适用于视频聊天?
谢谢,Naveed
这在模拟器上工作正常但在设备上没有,因为我已经将高度硬编码为365.任何人都可以在这方面帮助我吗?
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="fill_parent"
android:layout_height="fill_parent">
<TabHost android:id="@+id/tab_host"
android:layout_width="fill_parent" android:layout_height="fill_parent">
<TabWidget android:layout_width="fill_parent"
android:layout_height="wrap_content" android:id="@android:id/tabs"
android:layout_gravity="bottom"/>
<FrameLayout android:id="@android:id/tabcontent"
android:layout_width="fill_parent" android:layout_height="fill_parent">
<RelativeLayout android:id="@+id/first_tab"
android:orientation="vertical" android:layout_width="fill_parent"
android:layout_height="365px">
<WebView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/webview"
android:layout_width="fill_parent"
android:layout_height="wrap_content"/>
<ImageView
android:id="@+id/widget31"
android:layout_width="fill_parent"
android:layout_height="49px"
android:layout_x="0px"
android:layout_y="0px"
android:background="#39000000"
android:layout_alignParentBottom="true">
</ImageView>
<ImageButton
android:id="@+id/btnFB"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/fb"
android:background="#00000000"
android:layout_alignRight="@+id/widget31"
android:layout_alignParentBottom="true">
</ImageButton>
<TextView
android:id="@+id/myTextView1"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:text="Share"
android:textColor="#111111"
android:textSize="14pt"
android:paddingBottom="5px"
android:layout_alignLeft="@+id/widget31"
android:layout_alignParentBottom="true"/>
<ImageButton
android:id="@+id/btnTwitter"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/twitter"
android:visibility="invisible"
android:background="#00000000"
android:layout_alignRight="@+id/widget31"
android:layout_alignParentBottom="true">
</ImageButton>
<!-- Replace TextView with your layout content for this tab …
Run Code Online (Sandbox Code Playgroud) 如何从资产库中播放视频文件?我有像文件的URL
"assets-library://asset/asset.MOV?id=1000000023&ext=MOV"
Run Code Online (Sandbox Code Playgroud)
但是我无法使用以下代码在媒体播放器中播放此文件:
NSString *urlAddress = @"assets-library://asset/asset.mov?id=1000000023&ext=mov";
NSURL *theURL = [NSURL URLWithString:urlAddress];
MPMoviePlayerController *mp = [[MPMoviePlayerController alloc] initWithContentURL:theURL];
Run Code Online (Sandbox Code Playgroud) 我一直在使用CodeSmith从DB生成.NET代码.SQLite DB是否有类似的代码生成工具,它为objective-c生成代码?
我正在使用xmppframework for iPhone.我想知道如何查看我的特定域的所有可用用户?
谢谢
我在scrollview中动态添加一些视图并增加了scrollview的内容大小,但我想在其高度的底部滚动scrollview .
scrollRectToVisible对我没有帮助.它只是滚动到我的iPhone屏幕的可见视图,但我想达到scrollview内容的底部.
谁能给我一些示例代码?
谢谢,
Naveed Butt
iphone ×5
objective-c ×4
ios ×2
ios4 ×2
android ×1
css-position ×1
ipad ×1
layout ×1
media-player ×1
sqlite ×1
superview ×1
uiscrollview ×1
uitextfield ×1
uiview ×1
videochat ×1
xmpp ×1