小编Nav*_*afi的帖子

访问当前视图的父视图 - iOS

当我想访问UIView当前的父级时,UIViewUIView在当前声明父级UIView的父UIView对象,并通过将父对象分配给当前视图的对象属性来访问它.

有没有办法摆脱这种情况并直接调用父视图的方法或属性?

我也试过(parentView *) self.view.superview但没有帮助.

调用此对象的函数时会出错

[UIVIew unrecognized selector......
Run Code Online (Sandbox Code Playgroud)

objective-c uiview superview ios

39
推荐指数
1
解决办法
4万
查看次数

22
推荐指数
2
解决办法
1万
查看次数

XMPPFramework - 如何创建MUC会议室并邀请用户?

我正在使用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应该收到邀请消息但没有发生任何事情.

任何帮助将不胜感激.:)

xmpp objective-c ios xmppframework

18
推荐指数
1
解决办法
1万
查看次数

如何在iPhone中实现视频聊天

有谁能告诉我在iPhone上进行视频聊天的方式?我试图在很多网站上搜索但是徒劳无功.

我找到了这个链接:http: //code.google.com/p/xmppframework/wiki/iPhone

我不确定这是否适用于视频聊天?

谢谢,Naveed

iphone video-streaming videochat

6
推荐指数
1
解决办法
7706
查看次数

如何在android中动态设置相对布局的高度

这在模拟器上工作正常但在设备上没有,因为我已经将高度硬编码为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)

layout android css-position

5
推荐指数
2
解决办法
2万
查看次数

如何从资产库中播放视频文件

如何从资产库中播放视频文件?我有像文件的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)

iphone media-player ipad ios4 assetslibrary

5
推荐指数
1
解决办法
4752
查看次数

Objective C的代码生成器

我一直在使用CodeSmith从DB生成.NET代码.SQLite DB是否有类似的代码生成工具,它为objective-c生成代码?

sqlite code-generation objective-c

3
推荐指数
1
解决办法
2309
查看次数

iphone xmppframework如何列出我的特定域的所有在线用户

我正在使用xmppframework for iPhone.我想知道如何查看我的特定域的所有可用用户?

谢谢

iphone xmppframework

3
推荐指数
1
解决办法
2380
查看次数

以编程方式滚动底部的滚动视图 - iphone

我在scrollview中动态添加一些视图并增加了scrollview的内容大小,但我想在其高度的底部滚动scrollview .

scrollRectToVisible对我没有帮助.它只是滚动到我的iPhone屏幕的可见视图,但我想达到scrollview内容的底部.

谁能给我一些示例代码?

谢谢,
Naveed Butt

iphone uiscrollview

1
推荐指数
1
解决办法
1万
查看次数