小编kin*_*ton的帖子

如何从一个特定的视图控制器隐藏导航栏

我创建了一个两个闪屏的iPhone应用程序.之后用户被带到第一个视图.我添加了一个UINavigationController.它工作得很好.

如何单独删除打开视图的导航栏?

主窗口

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {    


self.splashScreen = [[SplashScreen alloc] 
                initWithNibName:@"SplashScreen" 
                bundle:nil];
if (self.pageController == nil) {
openingpage *page=[[openingpage alloc]initWithNibName:@"openingpage" bundle:[NSBundle mainBundle]];
    self.pageController = page;
    [page release];
}
[self.navigationController pushViewController:self.pageController animated:YES];

[window addSubview:splashScreen.view];

 [splashScreen displayScreen];
[self.window makeKeyAndVisible];

return YES;
 }
Run Code Online (Sandbox Code Playgroud)

cocoa-touch ios

67
推荐指数
3
解决办法
6万
查看次数

更改UITableViewCellAccessoryDisclosureIndicator的颜色

一个简单的问题,我想将UITableViewCellAccessoryDisclosureIndicator(从右侧的箭头tableView)的颜色从默认灰色更改为白色.

cell.accessoryType=UITableViewCellAccessoryDisclosureIndicator;
Run Code Online (Sandbox Code Playgroud)

xcode objective-c uitableview

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

iphone褪色的图像

wat我想要的是在图像视图中显示图像并在5秒后淡化图像并显示下一个图像.图像存储在数组对象中...我能够在5秒后成功转换图像.我想要的是在5秒后淡出第一个图像并显示下一个图像必须在无限循环中发生...下面是代码,它对图像之间的正常过渡非常有用..我想要的是图像的淡化...并在下面的代码中添加淡入过渡

- (void)viewDidLoad {

    imgView.animationImages=[NSArray arrayWithObjects:  
                             [UIImage imageNamed:@"lori.png"],
                             [UIImage imageNamed:@"miranda.png"],
                             [UIImage imageNamed:@"taylor.png"],
                             [UIImage imageNamed:@"ingrid.png"],
                             [UIImage imageNamed:@"kasey.png"], 
                             [UIImage imageNamed:@"wreckers.png"], nil];


    imgView.animationDuration=20.0;
    imgView.animationRepeatCount=0;
    [imgView startAnimating];
    [self.view addSubview:imgView];
    [imgView release];



    [super viewDidLoad];
}
Run Code Online (Sandbox Code Playgroud)

xcode objective-c

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

如何将Android应用程序移植到黑莓手机上

大家好我为ios和android sdk开发应用程序.有任何教程解释如何将现有的Android应用程序移植到黑莓手机并在黑莓市场上发布.就黑莓而言,我毫不知道.我看到最近的一个视频RIM在黑莓手册上播放Android应用程序..如果有可能在黑莓手册中移植Android应用程序.该移植只能缩小到黑莓手册或所有其他黑莓产品.

android porting blackberry

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

如何更改默认蓝色的tabbar图标颜色?

我有四个标签.我能够将标签图标颜色从默认的蓝色更改为红色(或者可能是任何颜色),并且它可以完美地运行.问题是它只适用于三个tabbaritems,最后一个是默认蓝色.下面是代码.我正在编写此rootviewcontrollerAppDelegate.m代码您可以通过在appdelegate中粘贴以下代码来尝试此操作.你们能帮助我吗?我会非常感激!

@implementation UITabBar (ColorExtensions)

- (void)recolorItemsWithColor:(UIColor *)color shadowColor:(UIColor *)shadowColor shadowOffset:(CGSize)shadowOffset shadowBlur:(CGFloat)shadowBlur

{

CGColorRef cgColor = [color CGColor];

 CGColorRef cgShadowColor = [shadowColor CGColor];

for (UITabBarItem *item in [self items])

 if ([item respondsToSelector:@selector(selectedImage)] &&

    [item respondsToSelector:@selector(setSelectedImage:)] &&

       [item respondsToSelector:@selector(_updateView)])

{

CGRect contextRect;

  contextRect.origin.x = 0.0f;

 contextRect.origin.y = 0.0f;

 contextRect.size = [[item selectedImage] size];
            // Retrieve source image and begin image context

 UIImage *itemImage = [item image];

 CGSize itemImageSize = [itemImage size];

 CGPoint itemImagePosition; 

 itemImagePosition.x = ceilf((contextRect.size.width - itemImageSize.width) / 2); …
Run Code Online (Sandbox Code Playgroud)

xcode objective-c uitabbarcontroller uitabbaritem

7
推荐指数
2
解决办法
6883
查看次数

uiscrollview中的页面控制

我创建了一个包含页面控件的uiscrollview,它从资源包中加载图像..一切正常.可以滚动浏览不同的图像..问题是如果我点击相应的页面控件(点),我无法导航相应的图像....你们可以帮助我下面的代码...下面的代码工作得很好

// Email.h

@interface Email : UIViewController<UIScrollViewDelegate>
{
   UIPageControl *pageControl;
   UIScrollView *scroller;
}

@property (nonatomic,retain)IBOutlet UIPageControl *pageControl;
@property (nonatomic,retain)IBOutlet UIScrollView *scroller;

-(IBAction)clickPageControl:(id)sender;

@end


// Email.m

@implementation Email
@synthesize pageControl,scroller;

-(IBAction)clickPageControl:(id)sender
{
   int page=pageControl.currentPage;
   CGRect frame=scroller.frame;
   frame.origin.x=frame.size.width=page;
   frame.origin.y=0;
   [scroller scrollRectToVisible:frame animated:YES];
}

-(void)scrollViewDidEndDecelerating:(UIScrollView *)scrollView
{
   int page = scrollView.contentOffset.x/scrollView.frame.size.width;
   pageControl.currentPage=page;
}

- (void)viewDidLoad 
{
   [super viewDidLoad];
   self.title=@"Press Photos";
   for (int i=1; i<10; i++)
   {
      UIImageView *images=[[UIImageView alloc]initWithImage:
        [UIImage imageNamed:[NSString stringWithFormat:@"%d.jpg",i]]];
      images.frame=CGRectMake((i-1)*320, 0, 320, 460);
      [scroller addSubview:images];
      [images release];
   }
   scroller.delegate=self;
   scroller.contentSize=CGSizeMake(320*9, …
Run Code Online (Sandbox Code Playgroud)

xcode objective-c

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

将数据从 iPhone 发送到 Web 服务

我正在开发一个 iPad 应用程序,用户在其中填写他们的详细信息并按下提交按钮,该按钮将信息发送到特定的 Web 服务器(稍后将被一个人查看)

就 Web 服务协议而言,我知道 JSON 和 XML。是否还有其他协议需要我研究?(或者可能是完全不同的方法)

我会非常感谢任何帮助。

xcode objective-c

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

将json解析为iphone

我试图解析公共json flickr feed到iphone.im得到一个错误..

-JSONValue failed. Error trace is: (
    "Error Domain=org.brautaset.JSON.ErrorDomain Code=3 \"Unrecognised leading character\" UserInfo=0x4b43100 {NSLocalizedDescription=Unrecognised leading character}"
).....
Run Code Online (Sandbox Code Playgroud)

下面是json feed:

http://api.flickr.com/services/feeds/photos_public.gne?tags=hackdayindia&lang=en-us&format=json .....

如果你们能帮助我的话,那真是太棒了在此输入图像描述

xcode objective-c

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

从默认蓝色更改标签栏图标颜色

即时通讯尝试将标签栏图标颜色从默认蓝色更改为红色...我得到此错误"Stray'\ 342'在程序中"..我得到错误" - (void)recolorItemsWithColor:....... "而且在实施部分......无论如何都要解决错误...是否还有其他方法可以将标签栏图标从默认蓝色更改为其他颜色

@interface UITabBar (ColorExtensions)

– (void)recolorItemsWithColor:(UIColor *)color shadowColor:(UIColor *)shadowColor shadowOffset:(CGSize)shadowOffset shadowBlur:(CGFloat)shadowBlur;

@end
Run Code Online (Sandbox Code Playgroud)

xcode objective-c

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

如何在iPhone中创建透明的Web视图

即时解析一个RSS源并将其加载到webview ..在webview.wat的背景中放置一个图像我想要的是一个透明的webview,它显示图像和解析的内容....下面是code..cud你帮帮我... itemSummary包含解析的feed

[self.itemSummary loadHTMLString:[item objectForKey:@"description"] baseURL:nil];

[self.itemSummary setClipsToBounds:YES];

self.itemSummary.opaque=NO;

self.itemSummary.backgroundColor=[UIColor clearColor];
Run Code Online (Sandbox Code Playgroud)

xcode objective-c

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