on Sunday, April 19, 2015

There are a number of apps coming out at the moment, that solve the problem of USB networking to a MAC/PC on IOS. Up until now, it was only possible to set up a USB network if the IOS device was jailbroken - however, that's all changed recently.


The apps seem to be using tunneling over USB mux. There's a couple of examples here - https://theiphonewiki.com/wiki/Usbmux https://code.google.com/p/iphonetunnel-usbmuxconnectbyport/


USB mux seems to use TCP connection. I'm wondering whether it is feasible for a UDP connection to be used instead of TCP? I'm guessing this would require some kind of app on the PC/MAC to open a connection when the USB cable is plugged in?


Anyone know any information about this new phenomenon?


I am thinking of installing an app from a large internet company on my iPhone. Suppose I install the firms app and log in to my account, delete it and re-install it and log in again with a different account (say, for example I download EBay's mobile app or Amazon's mobile app on an iOS device) - is there ANY way for the company to connect the two accounts?


I understand that every iPhone has a UUID (unique identifier) but I also thought that Apple does not allow 3rd party firms to use it - is this correct?


If yes, is there any other way for a company to connect the two accounts? And is deleting the app from my iPhone (and then re-downloading it) sufficient or must I re-install the entire OS?


The question is primarily about Apple (or iPhone) but I would be interested in knowing the same for Android.


Thanks


enter image description here


I made the orange UIView square according to the width of a device screen. something like this :



CGRect squareFrame = CGRectMake(0, 0, screenWidth, screenWidth);
_uiview = [[DrawSchedule alloc]initWithFrame:squareFrame];
[self.view addSubview: _uiview];




  • I want the yellow UILabel to always stick to the orange UIView.




  • I didn't put any size constraints on the orange UIView because it's resized programatically..



  • So here is where I am having trouble setting the position of the yellow UILabel.


How can I accomplish this? Does this have to be done programatically only?


Because.. I have multiple UILabels that should be positioned below the yellow UILabel later on.. Will i have to position all of them programatically?


I'm using a PaintCode StyleKit to generate a bunch of gradients, but PaintCode exports them as a CGGradient. I wanted to add these gradients a layer. Is it possible to convert a CGGradient to a CAGradientLayer?


my app rotate an image to particular location but it's not work and the arrow rotate to the north i want the arrow rotate to the particular location if any one know what the problem ?



class ViewController: UIViewController,CLLocationManagerDelegate{

var angle = CGFloat()
var locationManager = CLLocationManager()
var arrowImageView : UIImageView? = UIImageView()
var latitudeOfTargetedPoint = CLLocationDegrees()
var longitudeOfTargetedPoint = CLLocationDegrees()
func DegreesToRadians (value: Double) -> CGFloat {
return CGFloat(value * M_PI / 180.0)
}

func RadiansToDegrees (value: Double) -> CGFloat {
return CGFloat(value * 180.0 / M_PI)
}

override func viewDidLoad() {
super.viewDidLoad()

arrowImageView!.frame = CGRect(x: 100, y: 200, width: 100, height: 100)
arrowImageView!.image = UIImage(named: "arrow.png")
view.addSubview(arrowImageView!)

if CLLocationManager.locationServicesEnabled() {

println("CLLocationManager.locationServicesEnabled")

self.locationManager.delegate = self
self.locationManager.desiredAccuracy = kCLLocationAccuracyBest;
self.locationManager.distanceFilter = 100.0;

self.locationManager.startUpdatingLocation()
self.locationManager.startUpdatingHeading()

latitudeOfTargetedPoint = 46.948737
longitudeOfTargetedPoint = 44.990891
println("lat \(latitudeOfTargetedPoint)")
println("lon \(longitudeOfTargetedPoint)")
}

}

I am making a iOS framework in swift. Some part of the code is in Objective C. Although it works fine when the objective C methods are called in a Swift application via Bridging header but the methods are not getting recognized within framework written in Swift.


So I have two arrays a name array and a values array they are a string and double respectively. I want to be able for a user to type in a textfield and to iterate though the name array until there is a match then output the value that has the same number as the name to be outputted


this is the code i have:



for(var i = 0; i<name.count; i++){
if name[i] == typeFood{
yieldOutput == percent[i]

}
}