小编Sam*_*dar的帖子

如何在图像下写一个标题?

我有两个需要保持内联的图像; 我想在每张图片下面写一个标题.

<center>
   <a href="http://example.com/hello">
       <img src="hello.png" width="100px" height="100px">
   </a>
   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
   <a href="http://example.com/hi">
       <img src="hi.png" width="100px" height="100px">
   </a>
</center>
Run Code Online (Sandbox Code Playgroud)

我该如何实施?

html css html5

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

在iOS中按下按钮时打开另一个视图

我是iOS开发的新手,我想在当前视图中按下按钮时加载另一个视图.

我创建了一个基于视图的应用程序,以下是代码:

//我的文件名是poo1

//这是poo1ViewController.h文件

#import <UIKit/UIKit.h>
@interface poo1ViewController : UIViewController 
{
 IBOutlet UIButton *fl;
}
@property (nonatomic,retain) UIButton *fl;
-(IBAction) ifl:(id)sender;    
@end
Run Code Online (Sandbox Code Playgroud)

//这是poo1ViewController.m文件

#import "poo1ViewController.h"
@implementation poo1ViewController
@synthesize fl;
-(IBAction) ifl:(id) sender {
}
Run Code Online (Sandbox Code Playgroud)

poo1ViewController.xib我添加了一个按钮,并使用Interface Builder将其与文件所有者链接.

现在我已经为这个类添加了另一个视图,称为flip.xib刚添加了一个标签.

我想要的是,当我按下fl按钮时,该fl按钮将调用该方法,ifl并且该方法应该调用第二个视图,即flip.xib.

我该怎么做,如何使ifl方法加载flip.xib视图?

view ios

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

将按钮对齐到屏幕底部

我在框架布局中有两个按钮,希望它们在屏幕底部对齐另一个.

使用android:layout_gravity="bottom"使它们相互重叠.使用Relativelayout我没有问题但是relativelayout不支持android:layout_gravity="bottom"

我的XML布局文件

<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:background="@drawable/bg"
    android:orientation="vertical" >

    <Button
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:id="@+id/scanit"
        android:layout_gravity="bottom"
        android:text="Button 1" />
    <Button
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:id="@+id/inf"
        android:layout_gravity="bottom"
        android:text="Button 2" />
</FrameLayout>
Run Code Online (Sandbox Code Playgroud)

xml android relativelayout android-layout android-linearlayout

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

从零售商网站获取价格

我正在构建一个iOS和Android应用程序,它扫描条形码并从零售商网站上显示该书的产品页面.但现在,我只想从该产品页面获得价格而不是整页.

如何从页面中提取产品的价格,因为RedLaser使用它自己的应用程序.

产品页面:http://goo.gl/rDxAg 价格:321卢比

我想是这样,它可以在iOS和Android来实现,而无需使用外部服务器.

我是新手,所以任何帮助都将受到高度赞赏.

android barcode ios web

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

如何在iOS中将Google地图与位置数据相关联

我有一个位置的纬度和经度数据,当用户点击共享并选择电子邮件等选项时,如何将其设为Google地图链接.

这是我用来获取位置数据的代码:

// 这是.h文件

@interface locate : UIViewController <CLLocationManagerDelegate,MKMapViewDelegate> 
{
    CGPoint gestureStartPoint;
    CLLocationManager *locationManager;
    CLLocation        *startingPoint;

    UILabel *latitudeLabel;
    UILabel *longitudeLabel;
    UILabel *altitudeLabel;
    MKMapView *mapView;
}

@property (assign) CGPoint gestureStartPoint;
@property (nonatomic, retain) CLLocationManager *locationManager;
@property (nonatomic, retain) CLLocation *startingPoint;
@property (nonatomic, retain) IBOutlet UILabel *latitudeLabel;
@property (nonatomic, retain) IBOutlet UILabel *longitudeLabel;
@property (nonatomic, retain) IBOutlet UILabel *altitudeLabel;
@property (nonatomic, retain)  IBOutlet  MKMapView *mapView;
@end
Run Code Online (Sandbox Code Playgroud)

// 这是.m文件

#import "locate.h"


@implementation locate
@synthesize gestureStartPoint,locationManager,startingPoint,latitudeLabel,longitudeLabel,altitudeLabel,mapView;


- (void)dealloc
{
    [locationManager release];
    [startingPoint release];
    [latitudeLabel …
Run Code Online (Sandbox Code Playgroud)

maps xcode ios

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

提交到AppStore后重命名iOS App

我刚开发并提交了应用程序.在开发和测试目的中,我将应用程序名称命名为"XYZ",在准备AppStore时,我在iTunes连接中给出了一个名为"XYZ-abcd"的名称.

在尝试上传二进制文件时,它显示错误,因此我不得不将其名称更改为"XYZ-abcd",但在我的手机上运行应用程序后,整个文本都没有显示出来.我已经上传了二进制文件和状态显示:上传已收到.

怎么改呢?

iphone objective-c universal ipad ios

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

如何进度进度条

我希望进度条在匹配字符串时增加.就像我点击"是"一样,"是"栏会增加.但由于某种原因,我无法取得进展.

码:

public class result extends VoteActivity{

        private ProgressBar mProgress;
     private int mProgressStatus = 0;

     private Handler mHandler = new Handler();

     public void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);

         setContentView(R.layout.alert);
if(choice=="Yes")
{   
         mProgress = (ProgressBar) findViewById(R.id.p1);

         // Start lengthy operation in a background thread
         new Thread(new Runnable() {
             public void run() {

                     ++mProgressStatus;


                     // Update the progress bar
                     mHandler.post(new Runnable() {
                         public void run() {
                             mProgress.setProgress(mProgressStatus);
                         }
                     });

             }
         }).start();
}
Run Code Online (Sandbox Code Playgroud)

我在这做错了什么?

java eclipse android progressdialog

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