Tag Archives: How To

How To Get Rid of UIMenuItems in the UIMenuController

The UIMenuController is something well loved by all iOS owners. With its introduction came copy/paste, a well received (and long due) feature. But what if one wants to harness the power of UIMenuController for their own gains?

It’s quite possible by utilizing the menuItems @property of the UIMenuController class. Simply stick in your NSArray containing UIMenuItems and you’re good to go, right? Well, maybe, but the following is what I got and it simply wasn’t good enough for me:

Notice how I was able to get my “Test” UIMenuItem inserted into the UIMenuController, it worked! However, the UIMenuController brought everyone else to the party leading to a very crowded feel (this actually filled my iPhone’s screen).

I wanted just my customer UIMenuItems in the controller. How to remove the rest of them? Well, if you try tapping on one of em, odd’s are your app will crash with an “unrecognized selector sent to instance” error. This actually turns out to be exactly what we need to get rid of the ones we don’t want! We are told which selector our UIView doesn’t implement and can filter it out in the canPerformAction:withSender: method that your UIView overrides. By utilizing the code below, I was able to get just my one custom UIMenuItem to display in the UIMenuController, exactly what I wanted!

- (BOOL)canPerformAction:(SEL)action withSender:(id)sender
{
if (action == @selector(copy:))
{
return NO;
}
if (action == @selector(cut:))
{
return NO;
}
if (action == @selector(paste:))
{
return NO;
}
if (action == @selector(select:))
{
return NO;
}
if (action == @selector(selectAll:))
{
return NO;
}
if (action == @selector(delete:))
{
return NO;
}
if (action == @selector(_setRtoLTextDirection:))
{
return NO;
}
if (action == @selector(_setLtoRTextDirection:))
{
return NO;
}
if (action == @selector(promptForReplace:))
{
return NO;
}
else
{
return YES;
}
}


This effectively got rid of the default UIMenuItems giving me my desired result as shown below:

How to Install Windows XP on the HP Pavilion DV4 – Including Drivers

 pavillion_downgrade

I’ve never been a big fan of HP. My dad bought a HP Pavilion dv9000 a couple of years ago and the thing has completely crapped out twice despite its being used on a desk 90% of the time. My aunt’s newer HP laptop was a pain to install XP on as I had to slipstream the SATA drivers into an XP install.

Even furthering my hate for HP laptops, my friend asked me to install Windows XP on his new HP Pavilion DV4-1222nr and I had to once again search for a way to get Windows XP installed. I first tried using the custom XP CD I used for my aunt, but after being greeted with a friendly "STOP: 0x0000007B" blue screen I quickly realized that the CD didn’t work because it was made for an HP laptop with an Intel processor, I was going to have to hunt for the AMD drivers and create a new CD…great.

Read MoreHow to Install Windows XP on the HP Pavilion DV4 – Including Drivers

Use Your iPhone 3G as a Modem – Using the USB Cable!

 iphone3g_to_desktop

I’ve had the iPhone 3G since it first came out. I camped out the night before, #2 in line for 15+ hours. I love my iPhone, so naturally my obsession with the device led me to jailbreak it. I’m running 2.2.1 software on there (haven’t "unlocked" it yet since I’m on AT&T for a long time), but it is jailbroken.

I’ve used PdaNet quite a bit and just recently, they released desktop software (XP/Vista only right now) that allows you to simply plug in your iPhone via USB and "pipe" the 3G Internet connection directly into your desktop or laptop. This is quite handy as you can turn off WIFI which will save quite a bit of power/heat vs the old way of tethering and also serves to charge your iPhone while sipping from its Internet connection!

About a week ago, the campus apartment Time-Warner internet here slowed to a crawl. It went from a typical 1.5Mbps connection to less than 100Kbps with huge latency spikes. I became fed up with this and decided to give the newest version of PdaNet a try.

Read MoreUse Your iPhone 3G as a Modem – Using the USB Cable!

How to Fix the Canon Pixma iP1500 “Waste Ink Absorber Full” Error.

A friend of mine really likes his Canon Pixma iP1500 printer. The ink is very cheap when bought from certain places (*cough* China *cough*); unfortunately though, the printer has been discontinued for some time. When my friend’s printer finally kicked the bucket and started giving him the dreaded "Waste Ink Absorber Full" error, it was thought that although the error can be bypassed temporarily, the only long-term solution was to buy a used printer off of eBay.

After buying several printers off of eBay, he came to me and asked me to take a look into the problem. After spending much time researching the problem on the internet, I learned of how the printer could have its on board firmware reset using a program and decided to dissect the printer to see if there was a way to actually clean out the ink absorbers. The process is really quite easy if you’re comfortable taking things apart and know what you’re doing, but can be a real drag if you don’t know where the pads are located.

I’ve now taken apart, cleaned, and reset several of my friend’s old Pixmas and they work like new. Below are a couple of videos I made showing how to physically take apart an iP1500 and clean the ink absorbers as well as how to reset the printer’s "print-count" to zero, making it think that it’s brand-new.

Read MoreHow to Fix the Canon Pixma iP1500 “Waste Ink Absorber Full” Error.