小编Ile*_*esh的帖子

如何访问iOS模拟器相机

嗨朋友我正在做相机应用程序.我需要测试应用程序,simulator但我无法访问 iOS simulator相机.对我的问题有任何帮助.如果不可能,simulator我需要访问我的系统相机.是否有可能?我尝试过图像视图控制器,但它不起作用.任何帮助将不胜感激.以下代码只有我试过..

self.imagePicker = [[UIImagePickerController alloc] init];  
UIImagePickerControllerSourceType sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
self.usingPopover = YES;
if ([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeCamera]) {
sourceType = UIImagePickerControllerSourceTypeCamera;
self.usingPopover = NO;
}
[self.imagePicker setSourceType:sourceType];
self.imagePicker.allowsEditing = NO;
self.imagePicker.delegate = self;
if (sourceType != UIImagePickerControllerSourceTypeCamera) {
self.popover = [[UIPopoverController alloc] initWithContentViewController:self.imagePicker];
self.popover.delegate = self;
[self.popover presentPopoverFromRect:popoverFrame inView:self.view  
permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES];
} else {
[self presentModalViewController:imagePicker animated:YES];    
}
Run Code Online (Sandbox Code Playgroud)

ios ios-simulator ios-camera

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

Xcode App Submisson ERROR ITMS-90207:"无效的捆绑包

当我通过Xcode应用程序验证成功提交应用程序但是当提交到Appstore然后发生此错误.

错误ITMS-90207:"无效的捆绑包.'example.app'中的捆绑包不包含捆绑可执行文件

我也尝试应用程序加载器版本3.1但发生相同的错误.我引用所有链接,如
链接1 链接2 链接3 链接4

在此输入图像描述

itunesconnect submission itunes-store ios

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

UIActivityViewController 隐藏我的应用程序共享扩展

在我的应用程序中,我添加了我的共享扩展程序,它工作正常,但我面临一个问题当我通过邀请应用程序时,UIActivityViewController我会显示我的应用程序扩展程序。如何隐藏我的应用程序扩展我自己的应用程序?

ios uiactivityviewcontroller ios-sharesheet swift3

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

UITableview单元切断了一些消息(视图)

我有消息屏幕并实现tableviewcell显示消息的自定义.消息应该是text或者在image某些情况下我需要显示包含信息的框(参见图像发送者​​和接收者).它工作正常,但有时消息视图被切断(见图像信息).我用了很多stackViews来隐藏和显示一些观点.

请在此处找到代码以获得更多理解.

寄件人
接收器
在此输入图像描述

iphone uitableview ios

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

我可以更改颜色/图像 UISearchBar 清除按钮吗?

在此处输入图片说明

我想将清除按钮颜色更改为白色。我尝试了很多方法,但没有运气。:(我还参考了以下链接。但它对我不起作用。

请在下面找到我尝试过的代码。我正在开发最新的 ios 11。感谢您的帮助。

class SearchBar: UISearchBar {

    override init(frame: CGRect) {
        super.init(frame: frame)

        sharedInit()
    }

    required init?(coder aDecoder: NSCoder) {
        super.init(coder: aDecoder)

        sharedInit()
    }

    override func awakeFromNib() {
        super.awakeFromNib()
        sharedInit()
    }

    private func sharedInit() {
        self.placeholder = "Search"
        self.setTextColor(color: .white)
        self.setTextFieldColor(color: UIColor.hexString("549C64"))
        self.setPlaceholderTextColor(color: .white)
        self.setSearchImageColor(color: .white)
        self.setTextFieldClearButtonColor(color: .white)

        if let textfield = self.value(forKey: "searchField") as? UITextField {
            if let backgroundview = textfield.subviews.first {
                backgroundview.layer.cornerRadius = 18.0;
                backgroundview.clipsToBounds = true;
            }
            //textfield.frame = CGRect(x: self.frame.origin.x, y: self.frame.origin.y, width: …
Run Code Online (Sandbox Code Playgroud)

uisearchbar ios swift4

3
推荐指数
2
解决办法
3890
查看次数

本地存储集项目替换而不是更新

我尝试将我的数据保存在本地存储中,setItem但是当我刷新 chrome 选项卡并将数据添加到我的阵列时,localStorage 中的数据会删除旧数据并设置新数据,而不是更新旧数据。

这是我的代码:


let capacity = 200;
let reservedRooms = 0;
let users = [];

let rsBox = document.getElementById('reservebox');

class Reserver {
    constructor(name , lastName , nCode , rooms){
        this.name = name ;
        this.lastName = lastName ;
        this.nCode = nCode ;
        this.rooms = rooms ;
    }

    saveUser(){
        if(this.rooms > capacity){
            console.log('more than capacity');
        }else{
            users.push({
                name : this.name ,
                lastName : this.lastName ,
                id : this.nCode ,
                rooms : this.rooms
            });
            capacity -= this.rooms ;
            reservedRooms …
Run Code Online (Sandbox Code Playgroud)

javascript json local-storage

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

我的联系人没有在ios 7中添加地址簿

我是iOS开发的初学者; 此代码在iOS 6中有效,但在iOS 7中无效...我的代码如下,我想在我的地址簿中添加联系人.我正在开发一个应用程序,我已经通过了很多链接,我有以下代码,但现在我被卡住了...

I have imported:

#import <AddressBook/AddressBook.h>
#import <AddressBookUI/AddressBookUI.h>
Run Code Online (Sandbox Code Playgroud)

ViewController.m 文件

ABAddressBookRef ab = ABAddressBookCreate();
    // To add a new ab entry with telephone number
    ABRecordRef newPerson = ABPersonCreate();

    ABRecordSetValue(newPerson, kABPersonFirstNameProperty, (__bridge CFStringRef) nameFirststr, nil);

    ABRecordSetValue(newPerson, kABPersonLastNameProperty, (__bridge CFStringRef)@"Jones", nil);

    //phone
    ABMutableMultiValueRef phoneNumberMultiValue =  ABMultiValueCreateMutable(kABMultiStringPropertyType);
    ABMultiValueAddValueAndLabel(phoneNumberMultiValue ,(__bridge CFStringRef)myphone,kABPersonPhoneMobileLabel, NULL);
    ABRecordSetValue(newPerson, kABPersonPhoneProperty,  phoneNumberMultiValue, nil);

    // Adreess
    ABMutableMultiValueRef multiAddress = ABMultiValueCreateMutable(kABMultiDictionaryPropertyType);
    NSMutableDictionary *addressDictionary = [[NSMutableDictionary alloc] init];

    if (Address)
    {
        if (Address)
            addressDictionary[(NSString *) kABPersonAddressStreetKey] = [NSString stringWithFormat:@"%@\n%@", Address, Address]; …
Run Code Online (Sandbox Code Playgroud)

iphone ios5 ios6 ios7

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

如何在UIImageview中绘制椭圆形状

我想绘制一个UIImageView椭圆形.我试图绘制,但我云找不到答案.我显示大部分圆形或圆形.
在这里输入链接描述
我试试这个,但这不起作用

#import <QuartzCore/QuartzCore.h>`
 CALayer *imageLayer = YourImageview.layer;
            [imageLayer setCornerRadius:5];
            [imageLayer setBorderWidth:1];
            [imageLayer setMasksToBounds:YES];
Run Code Online (Sandbox Code Playgroud)

在此输入图像描述

iphone objective-c ios

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